Changes between Initial Version and Version 1 of Ticket #15194


Ignore:
Timestamp:
May 31, 2017, 6:50:50 AM (2 years ago)
Author:
Kevin Broadey
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15194 – Description

    initial v1  
    33Here's a JSfiddle demonstrating the problem - https://jsfiddle.net/kmbro/x7w6hLtg/
    44
    5 While dialog() appears to be the culprit for allowing the ESCAPE "keyup" event to leak, I don't think it's responsible for RETURN. This seems to centre on how button "click" events are generated by the RETURN key, because they fire on "keydown" so the dialog has closed before the "keyup" event occurs. In contrast, using the spacebar to press the button triggers the "click" on "keyup" so teh dialog consumes thsi event. You can see this by pressing the Click Me! button by tabbing onto it and pressing RETURN - the dialog opens on "keydown". If you press the button using SPACE instead then the dialog doesn't open until the "keyup" when you release the key.
     5While dialog() appears to be the culprit for allowing the ESCAPE "keyup" event to leak, I don't think it's directly responsible for RETURN. This seems to centre on how button "click" events are generated by the RETURN key because they fire on "keydown", so the dialog has closed before the "keyup" event occurs. In contrast, using the spacebar to press the button triggers the "click" on "keyup" so teh dialog consumes thsi event. You can see this by pressing the Click Me! button by tabbing onto it and pressing RETURN - the dialog opens on "keydown". If you press the button using SPACE instead then the dialog doesn't open until the "keyup" when you release the key.
    66
    77The question is, what's so special about RETURN that is triggers a "click" event on "keydown" and not "keyup"?