Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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".
Comment | File | Size | Author |
---|---|---|---|
#6 | Peek 2018-11-30 09-08.gif | 509.11 KB | ljcarnieri |
#2 | message-button-prevent-submit-form-3017053-1.patch | 852 bytes | ljcarnieri |
Comments
Comment #2
ljcarnieri CreditAttribution: ljcarnieri at CI&T for CI&T commentedThe patch attached.
Comment #3
markhalliwellWhat exactly is the issue here?
Alert messages aren't supposed to respond to pressing enter.
Comment #4
ljcarnieri CreditAttribution: ljcarnieri at CI&T for CI&T commentedHi @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.
Comment #5
markhalliwellI 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.
Comment #6
ljcarnieri CreditAttribution: ljcarnieri at CI&T for CI&T commented@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:
Comment #7
ljcarnieri CreditAttribution: ljcarnieri at CI&T for CI&T commentedComment #9
markhalliwell