mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-28 01:49:05 +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:
parent
13c4963fab
commit
6624c5874f
@ -115,6 +115,13 @@
|
|||||||
if (popup) {
|
if (popup) {
|
||||||
setState("popup");
|
setState("popup");
|
||||||
applyState();
|
applyState();
|
||||||
|
// bind the popup to reset the speaker note state on close of the popup
|
||||||
|
popup.onload = () => {
|
||||||
|
popup.onbeforeunload = () => {
|
||||||
|
setState("inline-open");
|
||||||
|
applyState();
|
||||||
|
};
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
window.alert(
|
window.alert(
|
||||||
"Could not open popup, please check your popup blocker settings."
|
"Could not open popup, please check your popup blocker settings."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user