|
@@ -98,7 +98,6 @@ function showPopover() {
|
|
}
|
|
}
|
|
|
|
|
|
contentElement.style.maxWidth = contentMaxWidth;
|
|
contentElement.style.maxWidth = contentMaxWidth;
|
|
- containerElement.style.display = "block";
|
|
|
|
activeTarget.classList.add("popover-active");
|
|
activeTarget.classList.add("popover-active");
|
|
document.addEventListener("keydown", handleHidePopoverOnEscape);
|
|
document.addEventListener("keydown", handleHidePopoverOnEscape);
|
|
window.addEventListener("resize", queueRepositionContainer);
|
|
window.addEventListener("resize", queueRepositionContainer);
|
|
@@ -106,6 +105,8 @@ function showPopover() {
|
|
}
|
|
}
|
|
|
|
|
|
function repositionContainer() {
|
|
function repositionContainer() {
|
|
|
|
+ containerElement.style.display = "block";
|
|
|
|
+
|
|
const targetBounds = activeTarget.dataset.popoverAnchor !== undefined
|
|
const targetBounds = activeTarget.dataset.popoverAnchor !== undefined
|
|
? activeTarget.querySelector(activeTarget.dataset.popoverAnchor).getBoundingClientRect()
|
|
? activeTarget.querySelector(activeTarget.dataset.popoverAnchor).getBoundingClientRect()
|
|
: activeTarget.getBoundingClientRect();
|
|
: activeTarget.getBoundingClientRect();
|