Fossil SCM

Hide the timeline graph tooltip in the `pagehide' handler, as Chromium-based browsers (but not Firefox) are deprecating the `unload' handler.

florian 2024-01-22 13:37 trunk
Commit f97a29dd58fb40c05e884d1fac8728202c3a22b1fab302a6951211e721ed5882
1 file changed +1 -1
+1 -1
--- src/graph.js
+++ src/graph.js
@@ -134,11 +134,11 @@
134134
stopCloseTimer();
135135
tooltipObj.style.display = "none";
136136
tooltipInfo.ixActive = -1;
137137
tooltipInfo.idNodeActive = 0;
138138
}
139
-document.body.onunload = hideGraphTooltip
139
+window.onpagehide = hideGraphTooltip;
140140
function stopDwellTimer(){
141141
if(tooltipInfo.idTimer!=0){
142142
clearTimeout(tooltipInfo.idTimer);
143143
tooltipInfo.idTimer = 0;
144144
}
145145
--- src/graph.js
+++ src/graph.js
@@ -134,11 +134,11 @@
134 stopCloseTimer();
135 tooltipObj.style.display = "none";
136 tooltipInfo.ixActive = -1;
137 tooltipInfo.idNodeActive = 0;
138 }
139 document.body.onunload = hideGraphTooltip
140 function stopDwellTimer(){
141 if(tooltipInfo.idTimer!=0){
142 clearTimeout(tooltipInfo.idTimer);
143 tooltipInfo.idTimer = 0;
144 }
145
--- src/graph.js
+++ src/graph.js
@@ -134,11 +134,11 @@
134 stopCloseTimer();
135 tooltipObj.style.display = "none";
136 tooltipInfo.ixActive = -1;
137 tooltipInfo.idNodeActive = 0;
138 }
139 window.onpagehide = hideGraphTooltip;
140 function stopDwellTimer(){
141 if(tooltipInfo.idTimer!=0){
142 clearTimeout(tooltipInfo.idTimer);
143 tooltipInfo.idTimer = 0;
144 }
145

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button