Ticket #6020 (closed Bug: fixed)

Opened 4 years ago

Last modified 3 years ago

Copy and cut icons should be disabled on empty selection

Reported by: Saare Owned by: Saare
Priority: Normal Milestone: CKEditor 3.5.1
Component: General Version: 3.0
Keywords: Oracle Cc: satya_minnekanti@…

Description

Copy and cut toolbar buttons should be disabled when the selection is empty.

Attachments

6020.patch (1.5 KB) - added by mani 4 years ago.
6020_2.patch (1.6 KB) - added by Saare 3 years ago.
6020_3.patch (3.6 KB) - added by Saare 3 years ago.
6020_4.patch (3.8 KB) - added by Saare 3 years ago.
6020_5.patch (5.2 KB) - added by Saare 3 years ago.

Change History

comment:1 Changed 4 years ago by fredck

  • Status changed from new to confirmed

comment:2 Changed 4 years ago by Saare

#6239 has been marked has a DUP.

comment:3 Changed 4 years ago by satya

  • Cc satya_minnekanti@… added

comment:4 Changed 4 years ago by Senthil

  • Keywords Oracle added

comment:5 Changed 4 years ago by mani

  • Owner set to mani
  • Status changed from confirmed to assigned

Changed 4 years ago by mani

comment:6 Changed 4 years ago by mani

  • Status changed from assigned to review

comment:7 Changed 3 years ago by wwalc

  • Milestone set to CKEditor 3.5.1

comment:8 Changed 3 years ago by Saare

  • Status changed from review to assigned
  • Owner changed from mani to Saare

I'm taking this one over @mani.

Changed 3 years ago by Saare

comment:9 Changed 3 years ago by Saare

  • Status changed from assigned to review

comment:10 Changed 3 years ago by garry.yao

  • Status changed from review to review_failed

Not an option, keyboard hook brings serious performance just like #6438.

Changed 3 years ago by Saare

comment:11 Changed 3 years ago by Saare

  • Status changed from review_failed to review

Another approach is to use queryCommandEnabled and hook the selectionChange for readOnly check.

comment:12 Changed 3 years ago by garry.yao

  • Status changed from review to review_failed

Looks good, while readonly doesn't affect "paste" command state.

Changed 3 years ago by Saare

comment:13 Changed 3 years ago by Saare

  • Status changed from review_failed to review

comment:14 Changed 3 years ago by garry.yao

  • Status changed from review to review_failed

Let's also check whether the paste command state need to be constantly checked.

comment:15 Changed 3 years ago by Saare

  • Status changed from review_failed to review

queryCommandEnabled is false when there is no data to paste (probably other limitations as well). In Webkit, it will always return false for security reasons (#3788). In any case, the toolbar buttons' state should match the context menu's options.

comment:16 Changed 3 years ago by garry.yao

  • Status changed from review to review_failed

Other two paste commands could be aligned also. (paste plain text and paste word)

Changed 3 years ago by Saare

comment:17 Changed 3 years ago by Saare

  • Status changed from review_failed to review

comment:18 Changed 3 years ago by garry.yao

  • Status changed from review to review_passed

comment:19 Changed 3 years ago by Saare

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

Fixed with [6311].

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