From 345a6a0f9001b69d62537f643983314bbeffbdc3 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Wed, 10 Jul 2019 09:57:11 +0200 Subject: [PATCH] Update framed.js --- core/modules/editor/engines/framed.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 6e7da24da..5eee8255b 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -79,6 +79,7 @@ function FramedEngine(options) { // Add event listeners $tw.utils.addEventListeners(this.domNode,[ {name: "click",handlerObject: this,handlerMethod: "handleClickEvent"}, + {name: "focus",handlerObject: this.widget,handlerMethod: "handleFocusEvent"}, {name: "input",handlerObject: this,handlerMethod: "handleInputEvent"}, {name: "keydown",handlerObject: this.widget,handlerMethod: "handleKeydownEvent"} ]); @@ -152,6 +153,13 @@ FramedEngine.prototype.focus = function() { this.domNode.select(); } }; + +/* +Handle the focus event +*/ +FramedEngine.prototype.handleFocusEvent = function() { + this.widget.cancelPopups(); +}; /* Handle a click