diff --git a/app/javascript/retrospring/features/announcement/index.ts b/app/javascript/retrospring/features/announcement/index.ts index e86a9b17..9b14eb4c 100644 --- a/app/javascript/retrospring/features/announcement/index.ts +++ b/app/javascript/retrospring/features/announcement/index.ts @@ -3,7 +3,7 @@ import closeAnnouncementHandler from './close'; export default (): void => { registerEvents([ - { type: 'click', target: '.announcement button.close', handler: closeAnnouncementHandler, global: true }, + { type: 'click', target: document.querySelector('.announcement button.close'), handler: closeAnnouncementHandler }, ]); document.querySelectorAll('.announcement').forEach(function (el: HTMLDivElement) {