diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 7984eff4f..6e7da24da 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -79,7 +79,6 @@ function FramedEngine(options) { // Add event listeners $tw.utils.addEventListeners(this.domNode,[ {name: "click",handlerObject: this,handlerMethod: "handleClickEvent"}, - {name: "focus",handlerObject: this,handlerMethod: "handleFocusEvent"}, {name: "input",handlerObject: this,handlerMethod: "handleInputEvent"}, {name: "keydown",handlerObject: this.widget,handlerMethod: "handleKeydownEvent"} ]); @@ -153,16 +152,6 @@ FramedEngine.prototype.focus = function() { this.domNode.select(); } }; - -/* -Handle the focus event -*/ -FramedEngine.prototype.handleFocusEvent = function(event) { - if(this.widget.cancelPopups) { - this.widget.cancelPopups(); - } - return true; -}; /* Handle a click diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index acd4bc3d2..bb77893d7 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -122,7 +122,6 @@ SimpleEngine.prototype.handleInputEvent = function(event) { Handle a dom "focus" event */ SimpleEngine.prototype.handleFocusEvent = function(event) { - this.widget.cancelPopups(); if(this.widget.editFocusPopup) { $tw.popup.triggerPopup({ domNode: this.domNode, diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index 82b4484c6..8dfc88037 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -248,13 +248,6 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { } }; - /* - Cancel Popups - */ - EditTextWidget.prototype.cancelPopups = function() { - $tw.popup.cancel(0,this.engine.domNode); - }; - /* Handle a dom "keydown" event, which we'll bubble up to our container for the keyboard widgets benefit */ diff --git a/core/modules/utils/dom/popup.js b/core/modules/utils/dom/popup.js index aa89d705c..4ae1a44cd 100644 --- a/core/modules/utils/dom/popup.js +++ b/core/modules/utils/dom/popup.js @@ -149,46 +149,21 @@ Popup.prototype.show = function(options) { } }; -/* -Detect if a Popup contains an input field that has focus -Returns true or false -*/ -Popup.prototype.detectInputWithinPopup = function(node) { - var withinPopup = false, - currNode = node; - for(var i=0; i