From 50ddad5e41670d43d02b9799de39ea6fcd831f16 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 15 Dec 2017 15:33:53 +0100 Subject: [PATCH] Fix an issue with the tag prompt removing all keyup listeners --- www/common/common-interface.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index cb3e5b16a..ad6434441 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -55,6 +55,7 @@ define([ }; var stopListening = UI.stopListening = function (handler) { + if (!handler) { return; } // we don't want to stop all the 'keyup' listeners $(window).off('keyup', handler); }; @@ -210,7 +211,7 @@ define([ var $cancel = findCancelButton(tagger).click(function (e) { close(null, e); }); - listenForKeys(function () { + listener = listenForKeys(function () { $ok.click(); }, function () { $cancel.click();