roojs-ui.js
[roojs1] / roojs-ui-debug.js
index 148dead..eccdb83 100644 (file)
@@ -10412,6 +10412,7 @@ Roo.MessageBox = function(){
                         }
                     }
                 });
+              
                 dlg.on("hide", handleHide);
                 mask = dlg.mask;
                 dlg.addKeyListener(27, handleEsc);
@@ -10655,6 +10656,7 @@ Roo.Msg.show({
                 d.animateTarget = null;
                 d.show(options.animEl);
             }
+            dlg.toFront();
             return this;
         },
 
@@ -27747,14 +27749,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.
         
     },