[wp-trac] [WordPress Trac] #25934: Spacebar does not toggle checkbox to open link in new window/tab when in distraction free writing mode

WordPress Trac noreply at wordpress.org
Wed Dec 4 23:05:49 UTC 2013


#25934: Spacebar does not toggle checkbox to open link in new window/tab when in
distraction free writing mode
-------------------------------------+--------------------
 Reporter:  travisnorthcutt          |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  low                      |   Milestone:  3.8
Component:  Editor                   |     Version:  3.7.1
 Severity:  minor                    |  Resolution:
 Keywords:  needs-testing has-patch  |
-------------------------------------+--------------------

Comment (by nacin):

 return false in this context is equivalent to event.preventDefault() and
 event.stopPropagation(). Obviously, one/both of those is causing the
 problems here. returning null is equivalent to returning true; neither of
 these are prevented.

 I imagine that one or both of these were intended to be prevented here.
 You never know, though; that's why it is good to be explicit with these
 functions.) It's the preventDefault() that's triggering this bug. If you
 have only event.stopPropagation(), things work fine.

 Now the question is, was the preventDefault() necessary for other things?
 That I don't know. It seems like the Escape key still works, which is what
 [18069] was trying to fix.

 Then the question would be, is event.stopPropagation() necessary? Seems
 like it isn't, either. In which case [18069] didn't need to change it.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25934#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list