Don't submit form on hitting enter
This commit is contained in:
parent
8ba69fea5e
commit
06fe976a66
11
mibpov.js
11
mibpov.js
@ -2452,6 +2452,16 @@ exportHeaderLink.onclick = function() {
|
||||
toggleConfigSectionDisplay(this, exportContainer);
|
||||
}
|
||||
|
||||
/* Prevent forms from submitting */
|
||||
function disableFormSubmission() {
|
||||
let elements = document.querySelectorAll("form");
|
||||
for (let elem of elements) {
|
||||
elem.onsubmit = function() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Load events */
|
||||
|
||||
window.addEventListener("load", initBiomeColorSelectors);
|
||||
@ -2464,3 +2474,4 @@ window.addEventListener("load", updateWidgetStates);
|
||||
window.addEventListener("load", updateAltitudeText);
|
||||
window.addEventListener("load", unhideContent);
|
||||
window.addEventListener("load", fitCanvasInBody);
|
||||
window.addEventListener("load", disableFormSubmission);
|
||||
|
Loading…
x
Reference in New Issue
Block a user