X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FEditor.js;h=0b1b139f4fde5e6bebc2f97a6b2a299c845c82a5;hb=refs%2Fheads%2Fwip_leon_T7094_logo_image_upload_in_boilerplate;hp=6c857d9bbf19a49f83103a8218ebcaa7d653b660;hpb=8a0085765fdfd18657b3e835cd67358d17b4d99d;p=roojs1 diff --git a/Roo/Editor.js b/Roo/Editor.js index 6c857d9bbf..0b1b139f4f 100644 --- a/Roo/Editor.js +++ b/Roo/Editor.js @@ -151,16 +151,24 @@ Roo.extend(Roo.Editor, Roo.Component, { } }, - onSpecialKey : function(field, e){ - Roo.log('editor onSpecialKey'); + onSpecialKey : function(field, e) + { + //Roo.log('editor onSpecialKey'); if(this.completeOnEnter && e.getKey() == e.ENTER){ e.stopEvent(); this.completeEdit(); - }else if(this.cancelOnEsc && e.getKey() == e.ESC){ - this.cancelEdit(); - }else{ - this.fireEvent('specialkey', field, e); + return; } + // do not fire special key otherwise it might hide close the editor... + if(e.getKey() == e.ENTER){ + return; + } + if(this.cancelOnEsc && e.getKey() == e.ESC){ + this.cancelEdit(); + return; + } + this.fireEvent('specialkey', field, e); + }, /**