Skip to content

Commit

Permalink
Merge pull request #2058 from candela97/fix-notes-save-on-enter-ff
Browse files Browse the repository at this point in the history
NotesForm: Dispatch change event on input when hitting Enter
  • Loading branch information
tfedor authored Nov 19, 2024
2 parents c979f9b + b8bae4a commit dc5a6ae
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
input.addEventListener("keydown", e => {
if (e.key === "Enter" && !e.shiftKey) {
input.dispatchEvent(new Event("change")); // Workaround for FF
document.querySelector<HTMLElement>(".newmodal_buttons > .btn_medium")?.click();
}
});
Expand Down

0 comments on commit dc5a6ae

Please sign in to comment.