Fixed bug #16313: htmlArea RTE: WebKit does not support copy and cut commands anymore
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 9 Nov 2010 05:33:34 +0000 (05:33 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 9 Nov 2010 05:33:34 +0000 (05:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9313 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js

index 621bc64..4c1c8f2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
 
        * Fixed bug #16245: htmlArea RTE: When inserting link with IE8, trailing line break is also linked
        * Updated htmlArea RTE version to 2.1.3
+       * Fixed bug #16313: htmlArea RTE: WebKit does not support copy and cut commands anymore
 
 2010-11-07  Steffen Gebert  <steffen@steffen-gebert.de>
 
index 949ac06..bb0ec43 100644 (file)
@@ -2,6 +2,7 @@
 
        * Fixed bug #16245: htmlArea RTE: When inserting link with IE8, trailing line break is also linked
        * Updated htmlArea RTE version to 2.1.3
+       * Fixed bug #16313: htmlArea RTE: WebKit does not support copy and cut commands anymore
 
 2010-11-07  Stanislas Rolland  <typo3@sjbr.ca>
 
index 6109472..a62cd06 100644 (file)
@@ -45,7 +45,7 @@ HTMLArea.CopyPaste = HTMLArea.Plugin.extend({
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : '2.1',
+                       version         : '2.2',
                        developer       : 'Stanislas Rolland',
                        developerUrl    : 'http://www.sjbr.ca/',
                        copyrightOwner  : 'Stanislas Rolland',
@@ -84,9 +84,14 @@ HTMLArea.CopyPaste = HTMLArea.Plugin.extend({
         */
        onGenerate: function () {
                this.editor.iframe.mon(Ext.get(Ext.isIE ? this.editor.document.body : this.editor.document.documentElement), 'cut', this.cutHandler, this);
-                       // Add hot key handling if the button is not enabled in the toolbar
                Ext.iterate(this.buttonList, function (buttonId, button) {
-                       if (!this.isButtonInToolbar(buttonId)) {
+                               // Remove button from toolbar, if command is not supported
+                               // Starting with Safari 5 and Chrome 6, cut and copy commands are not supported anymore by WebKit
+                       if (!Ext.isGecko && !this.editor.document.queryCommandSupported(buttonId)) {
+                               this.editor.toolbar.remove(buttonId);
+                       }
+                               // Add hot key handling if the button is not enabled in the toolbar
+                       if (!this.getButton(buttonId)) {
                                this.editor.iframe.hotKeyMap.addBinding({
                                        key: button[1].toUpperCase(),
                                        ctrl: true,