New issue
Advanced search Search tips

Issue 765664 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

window.confirm returns true on ENTER with Cancel button focused

Reported by eschie...@instructure.com, Sep 15 2017

Issue description

Chrome Version       : 60.0.3112.113 (Official Build) (64-bit)
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: hard to tell, since it has no focus indicators on its popup's buttons
    Firefox: on mac, behaves the same as chrome. on windows behaves as I would expect
         IE: ie11 on win8 behaves as I would expect

What steps will reproduce the problem?
(1) call window.confirm('a question')
(2) the confirm dialog is open and the Cnacel button has focus.
(3) "press" by typing ENTER

What is the expected result? confirm returns false


What happens instead? confirm returns true


Please provide any additional information below. Attach a screenshot if
possible.
It's deceiving to the keyboard only user to click the OK button on ENTER with the Cancel button focused.  It's also inconsistent with the behavior of a form that has a submit button, which will click a focused button on ENTER and not submit the form

 
a.html
201 bytes View Download

Comment 1 by woxxom@gmail.com, Sep 15 2017

Which OS are you running?
Chrome in Windows correctly returns "false".

MacOS. I've since learned that the behavior of clicking the default button on ENTER, is the correct behavior on a mac. However, I do not believe the cancel button should be given focus. That, I believe is incorrect and misleading.
Cc: kkaluri@chromium.org
Components: Blink>HTML>Dialog
Labels: Needs-Milestone M-63 OS-Linux OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Window 10, Ubuntu 14.04 & Mac 10.12.6 with chrome Stable #61.0.3163.91, Canary #63.0.3213.3 and also in the earlier version M50_#50.0.2661.0 This is a non-regression issue hence marking it as Untriaged.

Observed the same behavior in Firefox browser too.

Attaching the screen-cast for reference.
765664.mp4
267 KB View Download

Comment 4 by tkent@chromium.org, Sep 22 2017

Components: -Blink>HTML>Dialog Blink>WindowDialog

Sign in to add a comment