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 When cancelling with the Esc key it correctly gives cancelled (on Mac). I don't know how else to cancel it; I think it's impossible to move the focus from OK to Cancel.

@ppk I'm on OSX and can do that (I see the focus ring move). With Cancel focused, Space cancels but Enter confirms (!!!)

@heydon How do you do it? Maybe there's a setting I should toggle or something; I forget.

@ppk Oh, to enable focus of controls? You may have to go to Settings > Keyboard > Shortcuts to activate some disabled stuff.

Follow

@heydon Got it now! Test report confirmed: Enter confirms; Space cancels when the focus is on Cancel. Esc always cancels.

@ppk Thanks. It's a very counterintuitive in my opinion, but others say they're used to it.

Sign in to participate in the conversation
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!