Pressing the 'enter' key on a form that contains an HS widget, depending on which browser, usually causes the first submit button to be triggered (likely an HS button). This results in unpredictable behaviour. There is no way to determine the 'real' submit button, so disable the enter key.

Comments

dalin’s picture

StatusFileSize
new1.2 KB

The other options for fixing this cross-browser include:

a) Ensure that your 'default' button is always first in the sort-order, tab-order, and has a default. Then use CSS to position things where you need.

b) Create a duplicate button at the top of the form identical to your 'default' that is hidden with CSS.

Neither of these are possible since we have no idea what the 'default' button is. So disabling the enter key seems simplest.

dalin’s picture

Status: Active » Needs review
grndlvl’s picture

StatusFileSize
new1.21 KB

This seems to have been a little too broad, I have narrowed it to just input fields as it currently disables 'enter' for textareas.

  • stefan.r committed ff845c2 on 7.x-3.x authored by grndlvl
    Issue #1890448 by dalin, grndlvl: Pressing the 'enter' key on a form...
stefan.r’s picture

Issue summary: View changes
Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.