According to MDN (https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset_event), the reset event isn't specified as an event that bubbles. Which browsers does 'reset' not bubble?
Asked
Active
Viewed 101 times
0
-
If I recall correctly, you can't have nested ` – Pac0 Jul 21 '20 at 15:44
-
The use case (and please let me know if there's an easier way) is that 'reset' doesn't trigger 'input' events for input elements, which means that if an input element needs to know when its value has changed, it also needs to listen to form reset. These elements are added via code, so my options are either listening to the bubbling reset on document, or use a mutation observer and find the parent form when the element is connected (added to dom). – Nick Bilyk Jul 21 '20 at 15:48
-
@Pac0 You can have multiple forms on a page, and might want it to bubble out to a container. – Barmar Jul 21 '20 at 16:43
-
1Ok, I get the usecase. This could help: https://stackoverflow.com/questions/10319289/how-to-execute-code-after-html-form-reset-with-jquery ? – Pac0 Jul 21 '20 at 16:51