Fossil SCM

Prevent clicks to timeline hash links, which are now enclosed in extra SPAN elements with class name `timelineHash' in some view modes, from activating keyboard navigation focus tracking. Align the list of click-responsive HTML elements with [b09a9b621f] to filter more clicks on timeline entries to be ignored by the keyboard navigation focus manager.

florian 2026-01-10 16:41 timeline-keyboard-navigation
Commit ed087bf6d7ca1e2bbe45114aee758800729e0c04fc7d2798c9d81f7f2fa2f797
1 file changed +4 -2
+4 -2
--- src/graph.js
+++ src/graph.js
@@ -1201,12 +1201,14 @@
12011201
// FF it's necessary to listen to `mousedown' instead of `click' events.
12021202
window.addEventListener('mousedown',function(evt){
12031203
var
12041204
bMAIN = 0,
12051205
mCTRL = 1<<14,
1206
- mod = evt.altKey<<15|evt.ctrlKey<<14|evt.shiftKey<<13|evt.metaKey<<12;
1207
- if( evt.target.tagName in { 'INPUT':1, 'SELECT':1, 'A':1 } ||
1206
+ mod = evt.altKey<<15|evt.ctrlKey<<14|evt.shiftKey<<13|evt.metaKey<<12,
1207
+ xClickyHTML = /^(?:A|AREA|BUTTON|INPUT|LABEL|SELECT|TEXTAREA|DETAILS)$/;
1208
+ if( xClickyHTML.test(evt.target.tagName) ||
1209
+ evt.target.className=='timelineHash' ||
12081210
evt.button!=bMAIN || mod!=mCTRL ){
12091211
return;
12101212
}
12111213
var e = evt.target;
12121214
while( e && !/\btimeline\w+Cell\b/.test(e.className) ){
12131215
--- src/graph.js
+++ src/graph.js
@@ -1201,12 +1201,14 @@
1201 // FF it's necessary to listen to `mousedown' instead of `click' events.
1202 window.addEventListener('mousedown',function(evt){
1203 var
1204 bMAIN = 0,
1205 mCTRL = 1<<14,
1206 mod = evt.altKey<<15|evt.ctrlKey<<14|evt.shiftKey<<13|evt.metaKey<<12;
1207 if( evt.target.tagName in { 'INPUT':1, 'SELECT':1, 'A':1 } ||
 
 
1208 evt.button!=bMAIN || mod!=mCTRL ){
1209 return;
1210 }
1211 var e = evt.target;
1212 while( e && !/\btimeline\w+Cell\b/.test(e.className) ){
1213
--- src/graph.js
+++ src/graph.js
@@ -1201,12 +1201,14 @@
1201 // FF it's necessary to listen to `mousedown' instead of `click' events.
1202 window.addEventListener('mousedown',function(evt){
1203 var
1204 bMAIN = 0,
1205 mCTRL = 1<<14,
1206 mod = evt.altKey<<15|evt.ctrlKey<<14|evt.shiftKey<<13|evt.metaKey<<12,
1207 xClickyHTML = /^(?:A|AREA|BUTTON|INPUT|LABEL|SELECT|TEXTAREA|DETAILS)$/;
1208 if( xClickyHTML.test(evt.target.tagName) ||
1209 evt.target.className=='timelineHash' ||
1210 evt.button!=bMAIN || mod!=mCTRL ){
1211 return;
1212 }
1213 var e = evt.target;
1214 while( e && !/\btimeline\w+Cell\b/.test(e.className) ){
1215

Keyboard Shortcuts

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