Frontend: Fixing popup not showing if the button is not aligned with the popup (calling leavingPopup prematurly).
This commit is contained in:
parent
929158a32d
commit
f8ec7e427d
2 changed files with 4 additions and 3 deletions
|
@ -64,7 +64,9 @@
|
|||
application_link = data.application_link;
|
||||
filteredTags = filterTag(tags, id);
|
||||
// Active set to true after the await to avoid conflict when clicking outside while the popup hasn't showed yet.
|
||||
setTimeout(() => {
|
||||
active = true;
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +75,7 @@
|
|||
});
|
||||
|
||||
function hidePopup(event) {
|
||||
if (!active) {
|
||||
if (!active && popupMain.style.visibility === "visible") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
let isBottom = scrollY + innerHeight >= footer.offsetTop;
|
||||
let isMoved = scrollY + innerHeight >= sidebar.offsetHeight;
|
||||
let littleScreen = innerHeight < sidebar.offsetHeight;
|
||||
console.log(littleScreen);
|
||||
// Only having the sticky sidebar if the size of the screen is too 'little'
|
||||
|
||||
// Testing if sidebar is outside of scrolling scope
|
||||
|
|
Loading…
Add table
Reference in a new issue