From b69519c3677de6b911252ae8f04c8a9613ea56e1 Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 18 Jan 2022 11:32:06 +0800 Subject: [PATCH] Roo/form/HtmlEditor/ToolbarStandard.js --- Roo/form/HtmlEditor/ToolbarStandard.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Roo/form/HtmlEditor/ToolbarStandard.js b/Roo/form/HtmlEditor/ToolbarStandard.js index aea4d75031..d72555f62c 100644 --- a/Roo/form/HtmlEditor/ToolbarStandard.js +++ b/Roo/form/HtmlEditor/ToolbarStandard.js @@ -526,14 +526,16 @@ Roo.form.HtmlEditor.ToolbarStandard.prototype = { createLink : function(){ //Roo.log("create link?"); var ec = this.editorcore; - Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) { - if (btn != 'ok') { - return; - } - if(url && url != 'http:/'+'/'){ - ec.relayCmd('createlink', url); - } - }); + (function() { + Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) { + if (btn != 'ok') { + return; + } + if(url && url != 'http:/'+'/'){ + ec.relayCmd('createlink', url); + } + }); + }).defer(100, this); // we have to defer this , otherwise the mouse click gives focus to the main window. }, -- 2.39.2