Core 1.5.1 Throws IE Warning Enter email verification type after upgrading to the latest chrome

Since upgrading to Chrome 41.0.2272.89 m, Mootools Core 1.5.1 has issued a warning. Nothing serious, but if you keep yourself the same as me, it can annoy you a little.

var input = document.createElement('input'), volatileInputValue, html5InputSupport; // #2178 input.value = 't'; input.type = 'submit'; volatileInputValue = input.value != 't'; // #2443 - IE throws "Invalid Argument" when trying to use html5 input types try { input.type = 'email'; html5InputSupport = input.type == 'email'; } catch(e){} 

Warns:

The value specified for 't' is not a valid email address.

+5
source share
1 answer

To fix the error, change the try excerpt above:

 try { input.value = ''; input.type = 'email'; html5InputSupport = input.type == 'email'; } catch(e){} 

Or in the compressed version, find "email" and change this:

 try{p.type="email",h="email"==p.type}catch(c){} 

To:

 try{p.value="",p.type="email",h="email"==p.type}catch(c){} 
+6
source

Source: https://habr.com/ru/post/1215442/


All Articles