element can also be removed during gainfocus

This commit is contained in:
j 2017-07-29 22:06:27 +02:00
parent a579f47a27
commit 66a130e35f

View file

@ -51,9 +51,13 @@ Ox.Focus = (function() {
that.cleanup(); that.cleanup();
} }
} }
$element try {
.addClass('OxFocus') $element
.triggerEvent('gainfocus'); .addClass('OxFocus')
.triggerEvent('gainfocus');
} catch(e) {
that.cleanup();
}
} }
}, },
hasFocus: function($element) { hasFocus: function($element) {