Ticket #5681: 5681.patch
File 5681.patch, 1.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/contextmenu/plugin.js
54 54 onMenu : function( offsetParent, corner, offsetX, offsetY ) 55 55 { 56 56 var menu = this._.menu, 57 contextmenu = this, 57 58 editor = this.editor; 58 59 59 60 if ( menu ) … … 92 93 else if ( keystroke == 27 ) 93 94 { 94 95 this.hide(); 95 editor.focus();96 contextmenu._.editorFocus && editor.focus(); 96 97 } 97 98 return false; 98 99 }; … … 249 250 250 251 show : function( offsetParent, corner, offsetX, offsetY ) 251 252 { 252 this.editor.focus(); 253 // Determinate whether editor focus is required before open/ after close. (#5681) 254 if ( this._.editorFocus = offsetParent.getDocument().equals( this.editor.document ) || this.editor.focusManager.hasFocus ) 255 this.editor.focus(); 253 256 254 257 // Selection will be unavailable after context menu shows up 255 258 // in IE, lock it now.