[wp-trac] [WordPress Trac] #30817: wpview: Delegate focus to opened modal on edit

WordPress Trac noreply at wordpress.org
Mon Dec 22 21:17:34 UTC 2014


#30817: wpview: Delegate focus to opened modal on edit
--------------------------------------+------------------
 Reporter:  danielbachhuber           |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  4.2
Component:  TinyMCE                   |     Version:  4.0
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |     Focuses:
--------------------------------------+------------------
Changes (by azaozz):

 * version:   => 4.0
 * milestone:  Future Release => 4.2


Comment:

 The `editor.focus();` is needed for IE. All versions of IE threat non-
 editable elements in the editor (and even block elements with height/width
 set) as separate DOM fragments when selected, i.e. when the thick diagonal
 border with resize handles is shown.

 As the wpView toolbar is inside the non-editable element, the focus is
 transferred there on clicking a button. We hide the IE border, but the
 focus remains inside that DOM fragment which is outside of the editor DOM.
 That causes range errors when the wpView gets updated.

 To fix this we can move the focus back to the editor before opening the
 modal, only in IE.

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


More information about the wp-trac mailing list