-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
IE11 user login email validation fails if field has leading or trailing space #6058
Comments
I received a report that Firefox behaves like IE11. |
Magento 2.1.0 also having same problem |
Hi guys Thanks for reporting this issue. I have created internal ticket MAGETWO-57657 to fix it |
@dnadle, thank you for your report. |
This is caused by browser inconsistencies in See spec here: https://www.w3.org/TR/html5/forms.html#e-mail-state-(type=email) Code example: (function(document) {
var input = document.createElement('input');
input.type = 'email';
input.value = ' test@example.com';
console.log(input.value.indexOf(' ')); // -1 in chrome, 0 in IE
})(document) |
@mtbottens as I understand we cannot fix validation introduced by browser itself? Such browser-specific validation could be disabled but I don't think it's a good idea. |
@orlangur Essentially. No matter what we do, the browser is still going to return the value with the leading/trailing white space trimmed. The only thing we could really do is write a method to get the value which would handle trimming the whitespace for email inputs to support browsers which aren't following the spec. But doing that would require us overwriting logic in I personally believe this should just be filed away as progressive enhancement and nothing should be done about it, but I suppose that is a decision left to Magento. |
You could add a validation for whitespace prior to the one for invalid email, so the validation error is meaningful and the user understands what is wrong. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.2.6 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.1.15 release. |
Hi @dnadle. Thank you for your report. The fix will be available with the upcoming 2.3.0 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.2.6 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.1.15 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.2.6 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.2.6 release. |
Hi @dnadle. Thank you for your report. The fix will be available with the upcoming 2.1.15 release. |
Hi @dnadle. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
[TSG] Fixes for 2.3 (pr144) (2.3.7-develop)
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: