Roo/bootstrap/Modal.js
[roojs1] / Roo / bootstrap / Modal.js
index 8070b3d..2bf7dcb 100644 (file)
@@ -299,7 +299,14 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component,  {
         if (this.editableTitle) {
             this.headerEditEl =  this.headerEl.select('.form-control',true).first();
             this.headerEl.on('click', function() { this.toggleHeaderInput(true) } , this);
-            this.headerEditEl .on('specialkey', function() { this.toggleHeaderInput(false) } , this);
+            this.headerEditEl.on('keyup', function(e) {
+                    if(e.isNavKeyPress()){
+                            this.toggleHeaderInput(false)
+                    }
+                }, this);
+            this.headerEditEl.on('blur', function(e) {
+                this.toggleHeaderInput(false)
+            },this);
         }
 
     },
@@ -599,7 +606,9 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component,  {
     
             this.headerEditEl.dom.value = this.title;
             this.headerEditEl.removeClass('d-none');
+            this.headerEditEl.dom.focus();
             this.titleEl.addClass('d-none');
+            
             this.is_header_editing = true;
             return
         }