[wp-trac] [WordPress Trac] #31457: Press This: Close sidebar when cursor clicks out of sidebar or tab focus leaves sidebar

WordPress Trac noreply at wordpress.org
Fri Mar 6 00:39:17 UTC 2015


#31457: Press This: Close sidebar when cursor clicks out of sidebar or tab focus
leaves sidebar
-----------------------------+-----------------------------
 Reporter:  Michael Arestad  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  4.2
Component:  Press This       |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  ui, javascript
-----------------------------+-----------------------------

Comment (by azaozz):

 In 31457.2.patch:
 - Close the sidebar on moving the focus outside of it (by clicking or by
 "tabbing").
 - Clean up the JS a bit, use vars where possible.

 Based on using `.focusout` and looking at the next focused element
 (`.document.activeElement`).

 While working on it found a "strange" bug: when the sidebar is open,
 clicking on the background actually lets the clicks go through. Also
 hovering over TinyMCE buttons triggers the tooltips for them.

 Caused by using `box-shadow` to stretch the element only visually. The
 actual element has 0 height. Used a "backdrop" to fix that and make
 clicking under the tags in an open sidebar work as expected.

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


More information about the wp-trac mailing list