Roo/htmleditor/BlockFigure.js
authorAlan <alan@roojs.com>
Mon, 10 Jan 2022 07:23:28 +0000 (15:23 +0800)
committerAlan <alan@roojs.com>
Mon, 10 Jan 2022 07:23:28 +0000 (15:23 +0800)
Roo/htmleditor/BlockFigure.js

index 5767281..648091a 100644 (file)
@@ -78,7 +78,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             title : "Image Source URL",
                             msg : "Enter the url for the image",
                             buttons: Roo.MessageBox.OKCANCEL,
-                            fn: function(val){
+                            fn: function(btn, val){
+                                if (btn != 'ok') {
+                                    return;
+                                }
                                 b.image_src = val;
                                 b.updateElement();
                                 syncValue();
@@ -108,7 +111,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             title : "Link URL",
                             msg : "Enter the url for the link - leave blank to have no link",
                             buttons: Roo.MessageBox.OKCANCEL,
-                            fn: function(val){
+                            fn: function(btn, val){
+                                if (btn != 'ok') {
+                                    return;
+                                }
                                 b.href = val;
                                 b.updateElement();
                                 syncValue();