Popup opener to close the overlay

pull/3813/head
Kamran Ahmed 2 years ago
parent 91ce20776c
commit 9bcf421590
  1. 4
      src/components/TopicOverlay/topic.js

@ -286,10 +286,12 @@ export class Topic {
this.close(); this.close();
} }
const isClickedPopupOpener =
e.target.dataset['popup'] || e.target.closest('button[data-popup]');
const isClickedClose = const isClickedClose =
e.target.id === this.closeTopicId || e.target.id === this.closeTopicId ||
e.target.closest(`#${this.closeTopicId}`); e.target.closest(`#${this.closeTopicId}`);
if (isClickedClose) { if (isClickedClose || isClickedPopupOpener) {
this.close(); this.close();
} }
} }

Loading…
Cancel
Save