Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#32045 closed defect (bug) (fixed)

TinyMCE: views may get "stuck" in selected state

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


When opening a new tab and then going back to the editor, sometimes a view may remain selected. Clicking above, below or on another view doesn't deselect it.

To reproduce:

  • Insert https://twitter.com/WordPress/status/588418492535181312 from the modal.
  • Click on it to highlight, then click again (it opens another tab to twitter).
  • Close the new tab, go back to the editor.

At this point the editor appears "frozen" sometimes. The view is selected and cannot be deselected.

Attachments (1)

32045.patch (732 bytes) - added by azaozz 6 years ago.

Download all attachments as: .zip

Change History (5)

6 years ago

#1 @azaozz
6 years ago

Caused by removing the reference to the selected view on PreProcess which also fires in cases where we don't want to remove it. 32045.patch fixes it.

This ticket was mentioned in Slack in #core by azaozz. View the logs.

6 years ago

#3 @iseulde
6 years ago

  • Keywords has-patch added

32045.patch works for me and looks good.

Use deselect() to deselect views properly instead of just unsetting select, and don't run in PreProcess because we only need to change the cloned DOM.

#4 @azaozz
6 years ago

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

In 32257:

TinyMCE wpView: properly deselect views when hiding the editor. Do not remove selected on PreProcess.
Fixes #32045.

Note: See TracTickets for help on using tickets.