-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod count should be trimmed #434
Comments
Same for many other fields |
I cannot reproduce on Chrome. What's your browser? |
Sorry. I could not reproduce on Chrome either. I tested with Firefox 44 on Ubuntu |
Closing. |
Sorry for confusion.
Low prio, though. Please reopen. |
I've done pretty much investigation in this matter and it won't be easy to fix. To be honest I think we shouldn't fix it at all, because it's Firefox bug, not ours. Firefox doesn't fully implement I've tried to create new directive export default function numbersOnlyDirective() {
return {
require: 'ngModel',
link: function (scope, element, attr, ngModelCtrl) {
function filterInputValue(inputValue) {
if (inputValue) {
var transformedValue = inputValue.replace(/[^0-9]/g, '');
if (transformedValue !== inputValue) {
ngModelCtrl.$setViewValue(transformedValue);
ngModelCtrl.$render();
}
return transformedValue;
}
return undefined;
}
ngModelCtrl.$parsers.unshift(filterInputValue);
}
};
} Unfortunately providing whitespaces don't execute it on Firefox, only alpha characters. Moreover to make it work there was a need to switch There are too much issues with it on Firefox, that I believe we shouldn't create big workarounds just to make it work. I'd create a bug for it and perhaps change message to warn user about possible issues (there is even specific attribute for Firefox to display custom message only for it). |
If this is an issue with firefox I'd only add |
Adding Other possible solution is adding Which one seems to be more suitable for you? |
Issue details
leading or trailing spaces should be ignored. Similar behavior at Gmail
Steps to reproduce
Observed result
validation error
Expected result
ok
Comments
visually the input seems correct. So, the validation message is not understandable
The text was updated successfully, but these errors were encountered: