Use is_focused for element kbman removal event

This commit is contained in:
Jonathan Frederic 2014-02-24 16:21:54 -08:00
parent 6f7c502157
commit a6aaa8a886

View File

@ -760,7 +760,7 @@ var IPython = (function (IPython) {
// focusout is called. In this case we bind to the remove event of jQueryUI,
// which gets triggered upon removal, iff it is focused at the time.
e.on('remove', function () {
if (document.activeElement === e[0]) {
if (IPython.utils.is_focused(e[0])) {
console.log('kb remove');
that.enable();
}