[wp-trac] [WordPress Trac] #28279: DFW: escape key broken

WordPress Trac noreply at wordpress.org
Fri May 16 08:20:48 UTC 2014


#28279: DFW: escape key broken
---------------------------+-----------------------------
 Reporter:  avryl          |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Editor         |    Version:
 Severity:  normal         |   Keywords:
  Focuses:  accessibility  |
---------------------------+-----------------------------
 Two things are broken:

 1. When the content is focussed (place your cursor in the content),
 pressing esc doesn't work. Adding a listener to the TinyMCE editor solves
 this.
 2. When switching tabs in the browser (or removing focus from the document
 some other way), pressing esc doesn't work because the document isn't
 focussed. Adding a listener to the window instead solves this.

 You can't namespace events outside jQuery and keeping it in one place is
 useless, so I removed it.
 Used `keyup` rather than `keydown` because that will only fire once.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28279>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list