From 80f3edeb0fe2889921887ead0e066447ba8b8ccd Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 18 Jan 2022 11:33:09 +0800 Subject: [PATCH] fix dialog on htmleditor link --- Roo.js | 2 +- Roo/MessageBox.js | 2 ++ docs/src/Roo_MessageBox.js.html | 2 ++ ...oo_form_HtmlEditor_ToolbarStandard.js.html | 20 ++++++++++--------- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Roo.js b/Roo.js index 6fa5005b8c..612a227566 100644 --- a/Roo.js +++ b/Roo.js @@ -691,7 +691,7 @@ Roo.factory(conf, Roo.data); return 'xs' } - } + } }); diff --git a/Roo/MessageBox.js b/Roo/MessageBox.js index e88f3b9344..5f640f075b 100644 --- a/Roo/MessageBox.js +++ b/Roo/MessageBox.js @@ -121,6 +121,7 @@ Roo.MessageBox = function(){ } } }); + dlg.on("hide", handleHide); mask = dlg.mask; dlg.addKeyListener(27, handleEsc); @@ -364,6 +365,7 @@ Roo.Msg.show({ d.animateTarget = null; d.show(options.animEl); } + dlg.toFront(); return this; }, diff --git a/docs/src/Roo_MessageBox.js.html b/docs/src/Roo_MessageBox.js.html index 524d49c0a5..38cf67eac8 100644 --- a/docs/src/Roo_MessageBox.js.html +++ b/docs/src/Roo_MessageBox.js.html @@ -121,6 +121,7 @@ Roo.Msg.show({ } } }); + dlg.on("hide", handleHide); mask = dlg.mask; dlg.addKeyListener(27, handleEsc); @@ -364,6 +365,7 @@ Roo.Msg.show({ d.animateTarget = null; d.show(options.animEl); } + dlg.toFront(); return this; }, diff --git a/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html b/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html index 804c0cf912..efd183dbee 100644 --- a/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html +++ b/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html @@ -526,16 +526,18 @@ 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