preventing default when cookie poopup is visible

This commit is contained in:
Miodec 2022-05-16 22:15:19 +02:00
parent 46e0c5c960
commit 986de64359

View file

@ -33,7 +33,9 @@ export function show(): void {
.stop(true, true)
.css("opacity", 0)
.removeClass("hidden")
.animate({ opacity: 1 }, 100);
.animate({ opacity: 1 }, 100, () => {
$("#wordsInput").blur();
});
}
}
@ -87,3 +89,9 @@ $("#cookiePopup .acceptSelected").on("click", () => {
$("#cookiePopup .openSettings").on("click", () => {
showSettings();
});
$(document).on("keypress", (e) => {
if (!$("#cookiePopupWrapper").hasClass("hidden")) {
e.preventDefault();
}
});