extended "blur" behavior (using body click events)
This commit is contained in:
parent
02e699c597
commit
1932890dd0
@ -115,6 +115,11 @@ TuneableFrequencyDisplay.prototype.setupEvents = function() {
|
|||||||
};
|
};
|
||||||
$inputs = $.merge($(), me.input);
|
$inputs = $.merge($(), me.input);
|
||||||
$inputs = $.merge($inputs, me.suffixInput);
|
$inputs = $.merge($inputs, me.suffixInput);
|
||||||
|
$('body').on('click', function(e) {
|
||||||
|
if (!me.input.is(':visible')) return;
|
||||||
|
if ($.contains(me.element[0], e.target)) return;
|
||||||
|
submit();
|
||||||
|
});
|
||||||
$inputs.on('blur', function(e){
|
$inputs.on('blur', function(e){
|
||||||
if ($inputs.toArray().indexOf(e.relatedTarget) >= 0) {
|
if ($inputs.toArray().indexOf(e.relatedTarget) >= 0) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user