Skip to content

Commit

Permalink
Merge branch 't/9800'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Dec 14, 2012
2 parents 425410c + ad8f05e commit 979136f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions plugins/floatpanel/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ CKEDITOR.plugins.add( 'floatpanel', {
var doc = parentElement.getDocument(),
panel = getPanel( editor, doc, parentElement, definition, level || 0 ),
element = panel.element,
iframe = element.getFirst();
iframe = element.getFirst(),
that = this;

// Disable native browser menu. (#4825)
element.disableContextMenu();
Expand All @@ -77,13 +78,17 @@ CKEDITOR.plugins.add( 'floatpanel', {
dir: editor.lang.dir
};

editor.on( 'mode', function() {
this.hide();
}, this );
editor.on( 'mode', hide );
editor.on( 'resize', hide );
// Window resize doesn't cause hide on blur. (#9800)
doc.getWindow().on( 'resize', hide );

editor.on( 'resize', function() {
this.hide();
}, this );
// We need a wrapper because events implementation doesn't allow to attach
// one listener more than once for the same event on the same object.
// Remember that floatPanel#hide is shared between all instances.
function hide() {
that.hide();
}
},

proto: {
Expand Down

0 comments on commit 979136f

Please sign in to comment.