diff --git a/ui/actions/nuxeo-download-button.js b/ui/actions/nuxeo-download-button.js index 6736beaed..5a0cc59b0 100644 --- a/ui/actions/nuxeo-download-button.js +++ b/ui/actions/nuxeo-download-button.js @@ -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(); } diff --git a/ui/actions/nuxeo-favorites-toggle-button.js b/ui/actions/nuxeo-favorites-toggle-button.js index 348dacc3f..1367846b4 100644 --- a/ui/actions/nuxeo-favorites-toggle-button.js +++ b/ui/actions/nuxeo-favorites-toggle-button.js @@ -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(); }