ex-fastclick
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -331,5 +331,9 @@ ;(function () { | ||
// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. | ||
if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { | ||
length = targetElement.value.length; | ||
targetElement.setSelectionRange(length, length); | ||
if (deviceIsIOS && targetElement.setSelectionRange) { | ||
try { | ||
length = targetElement.value.length; | ||
targetElement.setSelectionRange(length, length); | ||
} catch (ex) { | ||
targetElement.focus(); | ||
} | ||
} else { | ||
@@ -336,0 +340,0 @@ targetElement.focus(); |
{ | ||
"name": "ex-fastclick", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Polyfill to remove click delays on browsers with touch UIs.", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
54187
700