Add hardcoded exceptions to preventing enter keypresses in workflow form (#2674)

Fixes https://github.com/webrecorder/browsertrix/issues/2675
This commit is contained in:
Emma Segal-Grossman 2025-06-18 13:05:02 -04:00 committed by GitHub
parent dde23426b2
commit 30e1224e8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2306,7 +2306,9 @@ https://archiveweb.page/images/${"logo.svg"}`}
if ( if (
key === "Enter" && key === "Enter" &&
this.progressState!.activeTab !== STEPS[STEPS.length - 1] this.progressState!.activeTab !== STEPS[STEPS.length - 1] &&
// Prevent places where Enter is valid from being stopped
!["TEXTAREA", "SL-TEXTAREA"].includes(el.tagName)
) { ) {
// Prevent submission by "Enter" keypress if not on last tab // Prevent submission by "Enter" keypress if not on last tab
event.preventDefault(); event.preventDefault();