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

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

index e178723..14a03df 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Fixed bug #16245: htmlArea RTE: When inserting link with IE8, trailing line break is also linked
        * Updated htmlArea RTE version to 2.0.7
+       * Fixed bug #16313: htmlArea RTE: WebKit does not support copy and cut commands anymore
 
 2010-11-06  Steffen Kamper  <steffen@typo3.org>
 
index 53060c3..c0d0fd6 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.0.7
+       * Fixed bug #16313: htmlArea RTE: WebKit does not support copy and cut commands anymore
 
 2010-11-03  Stanislas Rolland  <typo3@sjbr.ca>
 
index 99fe9ff..240c800 100644 (file)
@@ -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,