Skip to content

Commit

Permalink
add: Enter input unfocused
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokuyow committed Nov 17, 2023
1 parent fe8b3bf commit e42debf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ function setupInputFieldEventListeners(element) {
element.addEventListener('keyup', handleInputFormatting);
element.addEventListener('focus', handleFocus);
element.addEventListener('contextmenu', handleContextMenu);
element.addEventListener('keydown', function (event) {
if (event.key === 'Enter') {
this.blur();
}
});
}

function getDomElementById(id) {
Expand Down

0 comments on commit e42debf

Please sign in to comment.