1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-27 15:26:56 +02:00

Reset state to inline-open when speaker note popup is closed (#1441)

Partially addresses #182.

---------

Co-authored-by: Elliot Brandwein <ebrandwein@google.com>
This commit is contained in:
Elliot Brandwein 2023-11-16 06:49:24 -05:00 committed by GitHub
parent 13c4963fab
commit 6624c5874f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,13 @@
if (popup) {
setState("popup");
applyState();
// bind the popup to reset the speaker note state on close of the popup
popup.onload = () => {
popup.onbeforeunload = () => {
setState("inline-open");
applyState();
};
};
} else {
window.alert(
"Could not open popup, please check your popup blocker settings."