[wp-trac] [WordPress Trac] #42530: Unexpected focus lost when switching editor tabs

WordPress Trac noreply at wordpress.org
Tue Nov 14 23:40:39 UTC 2017


#42530: Unexpected focus lost when switching editor tabs
-------------------------------------+-------------------------------------
 Reporter:  ocean90                  |       Owner:  pento
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.9
Component:  Editor                   |     Version:  4.9
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch dev-feedback   |     Focuses:  accessibility,
  commit                             |  administration
-------------------------------------+-------------------------------------
Changes (by pento):

 * keywords:  has-patch needs-testing => has-patch dev-feedback commit


Comment:

 In [attachment:42530.3.diff]:

 When switching back to the Visual editor,
 `focusHTMLBookmarkInVisualEditor()` removes the bookmark elements
 correctly from TinyMCE, but doesn't remove them from the `<textarea>`.
 Unfortunately, autosave doesn't get the content from TinyMCE, it goes
 directly to the `<textarea>`, so it gets the HTML with the bookmark
 elements still in there.

 Calling `editor.save()` forces TinyMCE to write the content without the
 bookmark elements to the `<textarea>`, so that autosave doesn't see those
 elements.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42530#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list