I think I found a MAJOR Chrome bug with window.confirm(). If you cancel by keyboard, it confirms! Can anyone corroborate this, please?
codepen.io/heydon/pen/wEQMPo

@heydon Hitting Esc or tabbing to the ‘Cancel’ and pressing Space or Enter returns ‘cancelled’.

@aardrian On Windows? On OSX, I've had it confirmed (sorry, pun) that only Space on the Cancel button cancels. Enter confirms (!!!!)

Follow

@aardrian No, thanks. Here's a vid of the behavior on OSX (I press Enter when Cancel is focused).

@heydon That appears to be… a problem. Did you try from Codepen debug mode in a private window with no add-ons?

@aardrian No, but others have confirmed it is a macOS behavior. You have to manually switch on keyboard focus in OS settings to even GET to the bug in the first place...

@heydon I have always hated that keyboard support is off by default. Just absurd.

@heydon @aardrian definitely is… I can't count the number if times I confirmed dialogs when I wanted to cancel then. It is so ingrained in my muscle memory to "just hit enter".

(>__<)

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!