X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Ffloatpanel%2Fplugin.js;h=0a935284b499fc98caa4b5fe23935a9b954dbe97;hp=fb5e3a487feb218cd9631516dff3961dd0c8874b;hb=8761695d9b70afe75905deaac88f78c1f8aeb32d;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91 diff --git a/_source/plugins/floatpanel/plugin.js b/_source/plugins/floatpanel/plugin.js index fb5e3a4..0a93528 100644 --- a/_source/plugins/floatpanel/plugin.js +++ b/_source/plugins/floatpanel/plugin.js @@ -55,6 +55,10 @@ CKEDITOR.plugins.add( 'floatpanel', this.element = element; + // Register panels to editor for easy destroying ( #4241 ). + editor.panels ? editor.panels.push( element ) : editor.panels = [ element ]; + + this._ = { // The panel that will be floating. @@ -115,7 +119,10 @@ CKEDITOR.plugins.add( 'floatpanel', var left = position.x + ( offsetX || 0 ), top = position.y + ( offsetY || 0 ); - if ( ( rtl && ( corner == 1 || corner == 4 ) ) || ( !rtl && ( corner == 2 || corner == 3 ) ) ) + // Floating panels are off by (-1px, 0px) in RTL mode. (#3438) + if ( rtl && ( corner == 1 || corner == 4 ) ) + left += offsetParent.$.offsetWidth; + else if ( !rtl && ( corner == 2 || corner == 3 ) ) left += offsetParent.$.offsetWidth - 1; if ( corner == 3 || corner == 4 )