Failed to execute 'setSelectionRange' on 'HTMLInputElement'
jcubic commented on 7 Jan 2016
When I use number input I've got error in Google Chrome
Uncaught InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement':
The input element's type ('number') does not support selection.
|

jcubic commented on 7 Jan 2016
The fix will be something like:
activate: function() {
if(this.$input.is(':visible')) {
this.$input.focus();
var type = this.$input.attr('type');
if (type && type.match(/^(text|search|password|tel|url)$/i) || !type) {
$.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length);
}
if(this.toggleClear) {
this.toggleClear();
}
}
},
|

zorosun commented on 1 Aug 2016
@akakoori you might want to look at this Pull request I fixed it by inserting
(function() {
var original = $.fn.editableutils.setCursorPosition;
$.fn.editableutils.setCursorPosition = function() {
try {
original.apply(this, Array.prototype.slice.call(arguments));
} catch (e) { /* noop */ }
};
})();
|
当然,你也可以
min=
"0"