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;
|
application_link = data.application_link;
|
||||||
filteredTags = filterTag(tags, id);
|
filteredTags = filterTag(tags, id);
|
||||||
// Active set to true after the await to avoid conflict when clicking outside while the popup hasn't showed yet.
|
// Active set to true after the await to avoid conflict when clicking outside while the popup hasn't showed yet.
|
||||||
active = true;
|
setTimeout(() => {
|
||||||
|
active = true;
|
||||||
|
}, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
function hidePopup(event) {
|
function hidePopup(event) {
|
||||||
if (!active) {
|
if (!active && popupMain.style.visibility === "visible") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
let isBottom = scrollY + innerHeight >= footer.offsetTop;
|
let isBottom = scrollY + innerHeight >= footer.offsetTop;
|
||||||
let isMoved = scrollY + innerHeight >= sidebar.offsetHeight;
|
let isMoved = scrollY + innerHeight >= sidebar.offsetHeight;
|
||||||
let littleScreen = 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'
|
// Only having the sticky sidebar if the size of the screen is too 'little'
|
||||||
|
|
||||||
// Testing if sidebar is outside of scrolling scope
|
// Testing if sidebar is outside of scrolling scope
|
||||||
|
|
Loading…
Add table
Reference in a new issue