Skip to content

Commit

Permalink
ELEMENTS-1676: added comment for keydown action fix
Browse files Browse the repository at this point in the history
  • Loading branch information
swarnadipa-dev committed Oct 5, 2023
1 parent 5d8a0da commit 95cd508
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ui/actions/nuxeo-download-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ import '../nuxeo-button-styles.js';
ready() {
super.ready();
this.addEventListener('keydown', (event) => {
/* Prevent keypress to propagate to parent if key pressed is Enter */
if (event.key === 'Enter') {
event.stopPropagation();
}
Expand Down
1 change: 1 addition & 0 deletions ui/actions/nuxeo-favorites-toggle-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ import '../nuxeo-button-styles.js';
window.addEventListener('removed-from-favorites', this.removeFromFavoritesHandler);
this.addEventListener('click', this._toggle);
this.addEventListener('keydown', (event) => {
/* Prevent keypress to propagate to parent if key pressed is Enter */
if (event.key === 'Enter') {
event.stopPropagation();
}
Expand Down

0 comments on commit 95cd508

Please sign in to comment.