Opened 15 years ago

Closed 15 years ago

#3437 closed Bug (fixed)

Show blocks command state is not correctly preserved across mode changes.

Reported by: Martin Kou Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: UI : Toolbar Version: SVN (CKEditor) - OLD
Keywords: Confirmed Review+ Cc:

Description

To reproduce:

  1. Open replacebyclass.html.
  2. Press "Show Blocks" button.
  3. Switch to Source mode.
  4. Switch back to WYSIWYG mode.
  5. The blocks are still shown, but the state of the show blocks button is wrong.

This bug can be reproduced on all browsers.

Attachments (2)

3437.patch (582 bytes) - added by Garry Yao 15 years ago.
3437_2.patch (1.2 KB) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by Garry Yao

Keywords: Confirmed added
Owner: set to Garry Yao
Status: newassigned

Changed 15 years ago by Garry Yao

Attachment: 3437.patch added

comment:2 Changed 15 years ago by Garry Yao

Keywords: Review? added

comment:3 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

Other than coding style issues, the fix is actually to be done at line 127, which is supposed to do exactly what the patch is proposing.

comment:4 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed

The editor will restore all command that registered as activating within wysiwyg mode back to 'OFF' state with L383:

  this.on( 'mode', updateCommandsMode );

Two special commands which don't fall into this case were 'Maximize' and 'Showblock', which are required to preserve their states across mode switch.
I'm coming with a new patch which fix those two spots by listening to the 'mode' event at the very last .

Changed 15 years ago by Garry Yao

Attachment: 3437_2.patch added

comment:5 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

Please replace the strict equality operator (===) at line 127 with a simple equality operator and go ahead committing it.

comment:6 Changed 15 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3448]. Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy