fix unclickable unscreen
This commit is contained in:
parent
da25702a76
commit
53c54705ca
@ -149,6 +149,7 @@ export default function QuizAnswerer(props: Props) {
|
||||
background: "black",
|
||||
zIndex: 999,
|
||||
opacity: 0,
|
||||
pointerEvents: "auto",
|
||||
}}
|
||||
/>
|
||||
<QuizAnswererInner {...props} />
|
||||
|
@ -44,7 +44,10 @@ export default function ViewPublicationPage() {
|
||||
const overlay = document.getElementById("hideoverlay");
|
||||
|
||||
if (root !== null && overlay !== null && settings.cfg?.isUnSc) {
|
||||
overlay.style.cssText = "pointerEvents = auto;";
|
||||
console.log("overlay");
|
||||
console.log(overlay);
|
||||
console.log(overlay.style.cssText);
|
||||
console.log("-----------------------------------------------");
|
||||
unscreen(overlay, root);
|
||||
}
|
||||
}, []);
|
||||
|
@ -1,11 +1,11 @@
|
||||
function addOverlay(overlay: HTMLElement) {
|
||||
// const overlay = document.getElementById('overlay');
|
||||
overlay.style.opacity = "1"; // Затемнено
|
||||
overlay.style.pointerEvents = "auto"; // Включить клики
|
||||
overlay.style.display = "inherit"; //
|
||||
}
|
||||
function removeOverlay(overlay: HTMLElement) {
|
||||
overlay.style.opacity = "0"; // Вернуть в исходное состояние
|
||||
overlay.style.pointerEvents = "none"; // Игнорировать клики
|
||||
overlay.style.display = "none"; //
|
||||
}
|
||||
function addRemoveOverlayTimer(overlay: HTMLElement, time = 1000) {
|
||||
addOverlay(overlay);
|
||||
@ -19,7 +19,8 @@ let isMouseInside = true;
|
||||
let isWindowFocused = true;
|
||||
|
||||
export default function unscreen(overlay: HTMLElement, root: HTMLElement) {
|
||||
let focusTimeout: NodeJS.Timeout | undefined;
|
||||
overlay.style.display = "none";
|
||||
|
||||
// Проверка состояния и выполнение нужного действия
|
||||
function checkFocusAndMouse() {
|
||||
if (!isWindowFocused || !isMouseInside) {
|
||||
|
Loading…
Reference in New Issue
Block a user