Fossil SCM

Replace the tooltip 'unload' handler with 'pageshow' and 'pagehide' handlers so that restoring the focused entry on back/forward navigation also works with FF.

florian 2022-07-31 07:57 UTC timeline-keyboard-navigation
Commit 5e545a9f070a15bb50c7f3d97b10538462554e352e977052ee845219142c8101
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.onpageshow = 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.onpageshow = 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