WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#28313 closed defect (bug) (fixed)

wpviews: selecting a view can add an undo level

Reported by: iseulde Owned by: azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: has-patch
Focuses: Cc:

Description

That's because of the class="selected" added to the wrap. If we use data-mce-selected="true" instead, it will be automatically removed by TinyMCE.

See: https://github.com/tinymce/tinymce/blob/master/js/tinymce/classes/UndoManager.js#L25

Attachments (1)

28313.patch (2.0 KB) - added by iseulde 7 years ago.

Download all attachments as: .zip

Change History (4)

@iseulde
7 years ago

#1 @iseulde
7 years ago

  • Keywords has-patch added

#2 @gcorne
7 years ago

  • Milestone changed from Awaiting Review to 4.0

#3 @azaozz
7 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 28684:

wpView: use data-mce-selected instead of adding a class to mark a view as selected. This prevents adding an unneeded undo level. Props avryl, fixes #28313

Note: See TracTickets for help on using tickets.