Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.6.6.1
[ckeditor.git]
/
_source
/
plugins
/
menu
/
plugin.js
diff --git
a/_source/plugins/menu/plugin.js
b/_source/plugins/menu/plugin.js
index
0165d31
..
6e6b98e
100644
(file)
--- a/
_source/plugins/menu/plugin.js
+++ b/
_source/plugins/menu/plugin.js
@@
-1,5
+1,5
@@
/*
\r
/*
\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
@@
-175,13
+175,17
@@
CKEDITOR.plugins.add( 'menu',
\r
onHide : function()
\r
{
\r
\r
onHide : function()
\r
{
\r
- if ( CKEDITOR.env.ie )
\r
+ this._.unlockSelection();
\r
+ this.onHide && this.onHide();
\r
+ },
\r
+
\r
+ unlockSelection : function() {
\r
+ // Unlock the selection upon first panel closing.
\r
+ if ( CKEDITOR.env.ie && !this.parent )
\r
{
\r
var selection = this.editor.getSelection();
\r
{
\r
var selection = this.editor.getSelection();
\r
- selection && selection.unlock();
\r
+ selection && selection.unlock( true );
\r
}
\r
}
\r
-
\r
- this.onHide && this.onHide();
\r
},
\r
\r
showSubMenu : function( index )
\r
},
\r
\r
showSubMenu : function( index )
\r
@@
-258,8
+262,10
@@
CKEDITOR.plugins.add( 'menu',
{
\r
this._.onShow();
\r
// Don't menu with zero items.
\r
{
\r
this._.onShow();
\r
// Don't menu with zero items.
\r
- if ( ! this.items.length )
\r
+ if ( ! this.items.length ) {
\r
+ this._.unlockSelection();
\r
return;
\r
return;
\r
+ }
\r
}
\r
\r
corner = corner || ( this.editor.lang.dir == 'rtl' ? 2 : 1 );
\r
}
\r
\r
corner = corner || ( this.editor.lang.dir == 'rtl' ? 2 : 1 );
\r