Fossil SCM

Hide the tooltip when leaving the page.

drh 2019-05-23 17:18 tooltip-experiments
Commit 356c0d017ee45e2664f6f3772eafb5602a464143d27376e4acd13d6aed2ff9d0
1 file changed +1
--- src/graph.js
+++ src/graph.js
@@ -111,10 +111,11 @@
111111
function hideGraphTooltip(){
112112
stopCloseTimer();
113113
tooltipObj.style.display = "none";
114114
tooltipInfo.ixActive = -1;
115115
}
116
+document.body.onunload = hideGraphTooltip
116117
function stopDwellTimer(){
117118
if (tooltipInfo.idTimer != 0) {
118119
clearTimeout(tooltipInfo.idTimer);
119120
tooltipInfo.idTimer = 0;
120121
}
121122
--- src/graph.js
+++ src/graph.js
@@ -111,10 +111,11 @@
111 function hideGraphTooltip(){
112 stopCloseTimer();
113 tooltipObj.style.display = "none";
114 tooltipInfo.ixActive = -1;
115 }
 
116 function stopDwellTimer(){
117 if (tooltipInfo.idTimer != 0) {
118 clearTimeout(tooltipInfo.idTimer);
119 tooltipInfo.idTimer = 0;
120 }
121
--- src/graph.js
+++ src/graph.js
@@ -111,10 +111,11 @@
111 function hideGraphTooltip(){
112 stopCloseTimer();
113 tooltipObj.style.display = "none";
114 tooltipInfo.ixActive = -1;
115 }
116 document.body.onunload = hideGraphTooltip
117 function stopDwellTimer(){
118 if (tooltipInfo.idTimer != 0) {
119 clearTimeout(tooltipInfo.idTimer);
120 tooltipInfo.idTimer = 0;
121 }
122

Keyboard Shortcuts

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