Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent warnings in IE

  • Loading branch information...
commit c5a11e1d180e9c8dbef8d234bd26fb6717e6b6bb 1 parent c906d4e
@peterjanes authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 feature-detects/forms-inputnumber-l10n.js
View
5 feature-detects/forms-inputnumber-l10n.js
@@ -21,7 +21,10 @@ Modernizr.addTest('localizedNumber', function() {
input = el.childNodes[0];
root.appendChild(el);
input.focus();
- doc.execCommand('InsertText', false, '1,1');
+ try {
+ doc.execCommand('InsertText', false, '1,1');
+ } catch(e) { // prevent warnings in IE
+ }
diff = input.type === 'number' && input.valueAsNumber === 1.1 && input.checkValidity();
root.removeChild(el);
fake && root.parentNode.removeChild(root);
Please sign in to comment.
Something went wrong with that request. Please try again.