Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remember parentNode in case onChange callback mutates DOM
There's no guarantee that the onChange callback won't mutate the DOM in some way that removes the selected option node, thus creating a runtime error when null.dispatchEvent is called when trying to trigger the "blur" event on the parent. By saving the parentNode in a variable, we avoid this edge-case scenario.
- Loading branch information