diff --git a/src/components/TopicOverlay/topic.js b/src/components/TopicOverlay/topic.js index 1f2c625d9..aae7e8163 100644 --- a/src/components/TopicOverlay/topic.js +++ b/src/components/TopicOverlay/topic.js @@ -286,10 +286,12 @@ export class Topic { this.close(); } + const isClickedPopupOpener = + e.target.dataset['popup'] || e.target.closest('button[data-popup]'); const isClickedClose = e.target.id === this.closeTopicId || e.target.closest(`#${this.closeTopicId}`); - if (isClickedClose) { + if (isClickedClose || isClickedPopupOpener) { this.close(); } }