-
Type:
Task
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: core
-
2.400
Remove Prototype Event.on usages from confirm.js
The following usages of Prototype's Event.on remain:
for (let i = 0; i < buttons.length; i++) { var button = buttons[i]; name = button.getAttribute("name"); if (name == "Submit" || name == "Apply" || name == "OK") { $(button).on("click", function () { needToConfirm = false; }); } else { if (isModifyingButton(button)) { $(button).on("click", confirm); } } } var inputs = configForm.getElementsByTagName("input"); for (let i = 0; i < inputs.length; i++) { var input = inputs[i]; if (!isIgnoringConfirm(input)) { if (input.type == "checkbox" || input.type == "radio") { $(input).on("click", confirm); } else { $(input).on("input", confirm); } } } inputs = configForm.getElementsByTagName("select"); for (let i = 0; i < inputs.length; i++) { let input = inputs[i]; if (!isIgnoringConfirm(input)) { $(input).on("change", confirm); } } inputs = configForm.getElementsByTagName("textarea"); for (let i = 0; i < inputs.length; i++) { let input = inputs[i]; if (!isIgnoringConfirm(input)) { $(input).on("input", confirm); } }
These usages should be migrated to the addEventListener API.
- links to