formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.88k stars 1.06k forks source link

FIO-8359: Event No Longer Emitted on Submit #5608

Closed ryanformio closed 4 months ago

ryanformio commented 4 months ago

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8359

Description

What changed?

Previously formio.js was not emitting the error event on form submit.

Why have you chosen this solution?

Resolve error event emit

Dependencies

n/a

How has this PR been tested?

1. Check out 4.19.x branch in `formio.js`
2. yarn install && yarn build
3. change into the dist directory.
4. Use a simple http server to host files as if they were a local cdn `http-server -p 4003 --cors`
5. Set up a simple playground that listens for an error event to be emitted. (SEE ATTACHMENTS cdn.zip on this ticket)
6. Unzip cdn.zip and npm install && npm start
7. Submit form and view console.log statements.

Expected should see "Hello, World!" in console because the error event was emitted triggering this log message.

Actual result, do not see the message printed to console. Reverting line 1343 on https://github.com/formio/formio.js/pull/5101/files resolves this issue.

image

Checklist:

lane-formio commented 4 months ago

Resolved with https://github.com/formio/formio.js/pull/5472 in master branch. We'll cherry-pick that over if we decide we need it for 4.19.x.