From a6aaa8a88650d143ea547a0c6146d86916fa5ddf Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Mon, 24 Feb 2014 16:21:54 -0800 Subject: [PATCH] Use is_focused for element kbman removal event --- IPython/html/static/notebook/js/keyboardmanager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/html/static/notebook/js/keyboardmanager.js b/IPython/html/static/notebook/js/keyboardmanager.js index 94068cd6a..0d6f35104 100644 --- a/IPython/html/static/notebook/js/keyboardmanager.js +++ b/IPython/html/static/notebook/js/keyboardmanager.js @@ -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(); }