From 8cacfb77e928090953278dac15538c7e7e4a6dfe Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 10 Sep 2013 23:59:18 +0200 Subject: [PATCH] Fixed table editing in Firefox --- .../ckeditor/plugins/wbbcode/plugin.js | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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. */ -- 2.20.1