Commit d6757b98 by Noraiz Anwar Committed by GitHub

Merge pull request #14876 from edx/noraiz/ECOM-6206

ECOM-6206 Fix firefox issue for email field with extra whitespaces
parents d6db981f 8fa31a80
......@@ -157,6 +157,12 @@
$label = $form.find('label[for=' + $el.attr('id') + ']');
key = $el.attr('name') || false;
// Due to a bug in firefox, whitespaces in email type field are not removed.
// TODO: Remove this code once firefox bug is resolved.
if (key === 'email') {
$el.val($el.val().trim());
}
if (key) {
test = this.validate(elements[i]);
if (test.isValid) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment