Fix spinner component for firefox: deselect text on blur
This commit is contained in:
parent
f6b2252a9b
commit
13494b21d9
|
@ -145,7 +145,12 @@ define([
|
|||
if (!this.options.allowDecimal)
|
||||
el.on('keypress', '.form-control', _.bind(this.onKeyPress, this));
|
||||
el.on('focus', 'input.form-control', function() {
|
||||
me.$input && me.$input.select();
|
||||
setTimeout(function(){me.$input && me.$input.select();}, 1);
|
||||
});
|
||||
Common.Utils.isGecko && el.on('blur', 'input.form-control', function() {
|
||||
setTimeout(function(){
|
||||
me.$input && (me.$input[0].selectionStart = me.$input[0].selectionEnd = 0);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
this.switches = {
|
||||
|
|
Loading…
Reference in a new issue