From: Alexander Ebert Date: Tue, 10 Sep 2013 21:59:18 +0000 (+0200) Subject: Fixed table editing in Firefox X-Git-Tag: 2.0.0_Beta_9~48^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8cacfb77e928090953278dac15538c7e7e4a6dfe;p=GitHub%2FWoltLab%2FWCF.git Fixed table editing in Firefox --- diff --git a/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js b/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js index 6006d9a041..5168ddf2d7 100644 --- a/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js +++ b/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js @@ -55,6 +55,10 @@ $insertedText = ev.data; }, null, null, 1); event.editor.on('mode', function(ev) { + if ($.browser.mozilla && ev.editor.mode === 'wysiwyg') { + fixFirefox(); + } + ev.editor.focus(); insertFakeSubmitButton(ev); @@ -72,7 +76,11 @@ insertFakeSubmitButton(event); // remove stupid title tag - $(event.editor.container.$).find('.cke_wysiwyg_div').removeAttr('title'); + $(event.editor.container.$).removeAttr('title'); + + if ($.browser.mozilla) { + fixFirefox(); + } }); /** @@ -90,6 +98,16 @@ } + /** + * Disables object resizing and table handles in Firefox. + */ + function fixFirefox() { + document.designMode = 'on'; + document.execCommand('enableObjectResizing', false, false); + document.execCommand('enableInlineTableEditing', false, false); + document.designMode = 'off'; + } + /** * Removes obsolete dialog elements. */