Fossil

Check-in [1d5e6e3cae]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the "untick" and "copy hash/branch" handlers to not activate keyboard navigation mode, i.e. "untick" is also available in combination with mouse scrolling, and "copy hash/branch" requires a focused entry, instead of focusing an entry without copying its data.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: 1d5e6e3cae2f2d502dc6417177878362a06312ef2c28d8980d7c4a6f8780dbf4
User & Date: florian 2022-08-04 04:25:00.000
Context
2022-08-04
06:09
Enhance the H shortcut to consider the secondary selection on the /vdiff page as a waypoint. ... (check-in: 0c024627dc user: florian tags: timeline-keyboard-navigation)
04:25
Change the "untick" and "copy hash/branch" handlers to not activate keyboard navigation mode, i.e. "untick" is also available in combination with mouse scrolling, and "copy hash/branch" requires a focused entry, instead of focusing an entry without copying its data. ... (check-in: 1d5e6e3cae user: florian tags: timeline-keyboard-navigation)
04:11
Shortcut SHIFT+"," (comma) to untick all (better: one) node(s) without moving the focus indicator. ... (check-in: a4db0b2cfa user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
966
967
968
969
970
971
972



















973
974
975
976
977
978
979
980
        case kCPYH: break;
        case kCPYB: break;
        case kTMLN: break;
        case kVIEW: break;
        case kDONE: break;
        default: return;
      }



















      if( key==kDONE ){
        focusCacheSet(null);
        focusVisualize(null,false);
        document.cookie =
          'fossil_timeline_kbnav=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
        return;
      }
      document.cookie = 'fossil_timeline_kbnav=1;path=/';







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
        case kCPYH: break;
        case kCPYB: break;
        case kTMLN: break;
        case kVIEW: break;
        case kDONE: break;
        default: return;
      }
      if( key==kUNTK ){
        var tid = focusTickedId();
        if( tid ){
          var gn = document.getElementById('tln'+tid.slice(1));
          if( gn ) gn.click();
        }
        return;
      }
      else if( key==kCPYH || key==kCPYB ){
        var fid = focusCacheGet();
        if( fid ){
          var ri = timelineGetRowInfo(fid);
          if( ri ){
            copyTextToClipboard(
              key==kCPYH ? ri.hash.slice(0,ri.hashdigits) : ri.branch);
          }
        }
        return;
      }
      else if( key==kDONE ){
        focusCacheSet(null);
        focusVisualize(null,false);
        document.cookie =
          'fossil_timeline_kbnav=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
        return;
      }
      document.cookie = 'fossil_timeline_kbnav=1;path=/';
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
          else if( id==tik ) id = sel || cur || tik;
          else id = sel || cur || tik || id;
        }
        else if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();
        }
        else if( key==kUNTK ){
          var tid = focusTickedId();
          if( tid ){
            var gn = document.getElementById('tln'+tid.slice(1));
            if( gn ) gn.click();
          }
        }
        else if( key==kCPYH || key==kCPYB ){
          var ri = timelineGetRowInfo(id);
          if( ri ){
            copyTextToClipboard(
              key==kCPYH ? ri.hash.slice(0,ri.hashdigits) : ri.branch);
          }
        }
        else/* if( key==kTMLN || key==kVIEW )*/{
          var ri = timelineGetRowInfo(id);
          if( ri ){
            var page = key==kVIEW ? '/info/' : '/timeline?c=';
            var href = ri.baseurl + page + encodeURIComponent(ri.hash);
            if( href!=location.href.slice(-href.length) ){
              location.href = href;







<
<
<
<
<
<
<
<
<
<
<
<
<
<







1008
1009
1010
1011
1012
1013
1014














1015
1016
1017
1018
1019
1020
1021
          else if( id==tik ) id = sel || cur || tik;
          else id = sel || cur || tik || id;
        }
        else if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();
        }














        else/* if( key==kTMLN || key==kVIEW )*/{
          var ri = timelineGetRowInfo(id);
          if( ri ){
            var page = key==kVIEW ? '/info/' : '/timeline?c=';
            var href = ri.baseurl + page + encodeURIComponent(ri.hash);
            if( href!=location.href.slice(-href.length) ){
              location.href = href;