Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#8463 closed Bug (fixed)

WebKit: Cut/Copy don't go on "enabled" state

Reported by: fredck Owned by: Reinmar
Priority: Normal Milestone: CKEditor 3.6.4
Component: UI : Toolbar Version: 3.5.1
Keywords: WebKit Cc: nmaxim@…


Original message from our contact form, Ticket REF : 3815-QDFX-1500.

I found that 'cut' and 'copy' icons do not go to enabled state after you select text in editor (chrome v. 14.0.835.202 m windows). After exploring this I found that there is a problem with queryCommandEnabled function in clipboard plugin, so I propose a solution to you.

function stateFromNamedCommand( command, editor )
// IE Bug: queryCommandEnabled('paste') fires also
// guard to distinguish from the ordinary sources( either
// keyboard paste or execCommand ) (#4874). && ( depressBeforeEvent = 1 );

try {retval = editor.document.$.queryCommandEnabled( command ) ||
CKEDITOR.env.webkit && editor.getSelection().getRanges()[0].startOffset !=
editor.getSelection().getRanges()[0].endOffset ? CKEDITOR.TRISTATE_OFF :

depressBeforeEvent = 0;
return retval;

Attachments (1)

8463.patch (2.9 KB) - added by Reinmar 5 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 6 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version set to 3.5.1

Reproducible from CKEditor 3.5.1 rev [6311]

comment:2 Changed 5 years ago by Reinmar

That bug is visible from rev [6311] because in this revision states of buttons had been bound to what stateFromNamedComand is returning. This function was buggy even before that.

comment:3 Changed 5 years ago by dbrownITR

Are there any plans to integrate the proposed patch?

comment:4 Changed 5 years ago by astjohn

I would also like to see a solution for this issue.

Changed 5 years ago by Reinmar

comment:5 Changed 5 years ago by Reinmar

  • Owner set to Reinmar
  • Status changed from confirmed to review

This issue is already fixed in dev version of next major release (inaccessible for you).

I ported correct patch to version 3.6.3 - you can apply it if you want, or wait for new major or bugfixing release.

comment:6 Changed 5 years ago by Reinmar

  • Version changed from 3.5.1 to 3.6.4 (SVN - trunk)

comment:7 Changed 5 years ago by astjohn

@Reinmar, that's awesome. Thank you for this!

comment:8 Changed 5 years ago by garry.yao

  • Milestone set to CKEditor 3.6.4

comment:9 Changed 5 years ago by garry.yao

  • Component changed from General to UI : Toolbar
  • Keywords HasPatch removed
  • Status changed from review to review_passed

comment:10 Changed 5 years ago by Reinmar

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [7504].

comment:11 Changed 5 years ago by wwalc

  • Version changed from 3.6.4 (SVN - trunk) to 3.5.1

comment:12 Changed 5 years ago by j.swiderski

#9143 - there is still a problem when you select content with cursor placed underneath this content.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy