Ticket #3437 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

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

Reported by: martinkou 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

3437.patch (582 bytes) - added by garry.yao 6 years ago.
3437_2.patch (1.2 KB) - added by garry.yao 6 years ago.

Change History

comment:1 Changed 6 years ago by garry.yao

  • Keywords Confirmed added
  • Status changed from new to assigned
  • Owner set to garry.yao

Changed 6 years ago by garry.yao

comment:2 Changed 6 years ago by garry.yao

  • Keywords Review? added

comment:3 Changed 6 years ago by fredck

  • 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 6 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 6 years ago by garry.yao

comment:5 Changed 6 years ago by fredck

  • 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 6 years ago by garry.yao

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

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

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