New issue
Advanced search Search tips

Issue 598979 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

display:none button triggered on form enter key

Reported by nicho...@blasgen.com, Mar 30 2016

Issue description

Chrome Version       : 51.0.2693.2 (Official Build) canary (64-bit) (MacOS)
URLs (if applicable) : https://jsfiddle.net/516amfmL/2/
Other browsers tested: 49.0.2623.110 (Official Build) (64-bit) (MacOS & Windows)
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: OK (v 9.1)
    Firefox: FAIL (v 39.0)
         IE: OK (MS Edge on Windows)

What steps will reproduce the problem?
  (1) Visit https://jsfiddle.net/516amfmL/2/
  (2) Click into INPUT box.
  (3) Press ENTER
  (4) Not displayed <button> gets triggered, rather than the displayed button.

What is the expected result?

  One of two choices would be acceptable:
    (1) Simply submit the form and don't "click" any button.
    (2) "Click" the first displayed button, ignoring any action on hidden buttons.

What happens instead?

  The button that isn't visible, not even displayed, is triggered.

Please provide any additional information below. Attach a screenshot if
possible.

  I do wonder if this is a known Quirk and that this is a purposely non-fixed bug.
  I'm surprised that it works in Safari & MS Edge, but fails in Chrome & Firefox.

 
Screen Shot 2016-03-29 at 10.44.48 PM.png
200 KB View Download

Comment 1 by tkent@chromium.org, Mar 30 2016

Components: Blink>Forms>Submission
Owner: tkent@chromium.org
Status: WontFix (was: Unconfirmed)
This is a behavior defined by the standard.

https://html.spec.whatwg.org/multipage/forms.html#implicit-submission

The display:none button is the "default button" in this case.

Sign in to add a comment