Open
Description
Expected Behaviour
When a form is submitted a submit
event is triggered for the form.
Actual Behaviour
Forms are submitted by a listener on the click
event of the submit button. The payload is generated and POST'ed as a json via fetch
API. This prevents the triggering of the submit
event.
This behaviour prevents other features such as RUM or Conversion tracking to work automatically, as they listen to submit
events
Reproduce Scenario (including but not limited to)
https://www.hlx.live/developer/forms
Steps to Reproduce
- In your chrome browser open: https://www.hlx.live/developer/forms
- Open developer tools -> Console and add a
submit
listener on the form element. e.g.:document.getElementsByTagName('form')[0].addEventListener('submit', (e) => {console.log('form submitted');})
- Scroll down to the sample form in the page, enter some data and click submit button.
- Notice that in the browser Console, there is no message
form submitted
Metadata
Assignees
Labels
No labels