When press enter at field form with error messages, the form is not submitted, this problem is because the button in message don't have the attribute type "button".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ljcarnieri created an issue. See original summary.

ljcarnieri’s picture

Status: Needs work » Needs review
FileSize
852 bytes

The patch attached.

markhalliwell’s picture

Assigned: ljcarnieri » Unassigned
Status: Needs review » Postponed (maintainer needs more info)

What exactly is the issue here?

Alert messages aren't supposed to respond to pressing enter.

ljcarnieri’s picture

Hi @markcarver, after the form return error message and try submit again with enter into any field, instead of submit the form, the message error is closed, because broswer interpret enter into field as action for click in button close in error message, Case I put attribute type equal button in button element the form is submitted normally.

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I cannot reproduce this with stock core/bootstrap (browsers don't behave this way automatically):

https://monosnap.com/file/Zdzd6YQlvP0yZGQCGRIu5A4PTgRcWQ

Sounds like you have an issue with some other code.

ljcarnieri’s picture

FileSize
509.11 KB

@markcarver this problem happen only when errors messages is displayed into form. For example I install examples module, then use form into modal, this problem happened, see the gif attached:

ljcarnieri’s picture

Status: Closed (cannot reproduce) » Needs review

markhalliwell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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