You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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 viafetch
API. This prevents the triggering of thesubmit
event.This behaviour prevents other features such as RUM or Conversion tracking to work automatically, as they listen to
submit
eventsReproduce Scenario (including but not limited to)
https://www.hlx.live/developer/forms
Steps to Reproduce
submit
listener on the form element. e.g.:document.getElementsByTagName('form')[0].addEventListener('submit', (e) => {console.log('form submitted');})
form submitted
The text was updated successfully, but these errors were encountered: