Fossil SCM
Ensure the close timer is started for tooltips belonging to nodes instead of rails, and prevent an out-of-bounds array access for double-clicks outside of rails.
Commit
d57c1a797ce9cff50e040ec0d21e2fd793e1beb9d8ada09bd724d6e995ddc08a
Parent
356c0d017ee45e2…
1 file changed
+5
-2
+5
-2
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -599,10 +599,11 @@ | ||
| 599 | 599 | if( tx.fileDiff ){ |
| 600 | 600 | html = "artifact <a href=\""+dest+"\">"+h+"</a>" |
| 601 | 601 | }else{ |
| 602 | 602 | html = "check-in <a href=\""+dest+"\">"+h+"</a>" |
| 603 | 603 | } |
| 604 | + tooltipInfo.ixActive = -2; | |
| 604 | 605 | }else if( tooltipInfo.ixHover>=0 ){ |
| 605 | 606 | ix = tooltipInfo.ixHover |
| 606 | 607 | var br = tx.rowinfo[ix].br |
| 607 | 608 | var dest = branchHyperlink(ix) |
| 608 | 609 | var hbr = br.replace(/&/g, "&") |
| @@ -639,13 +640,15 @@ | ||
| 639 | 640 | hideGraphTooltip() |
| 640 | 641 | } |
| 641 | 642 | } |
| 642 | 643 | function dblclickOnGraph(e){ |
| 643 | 644 | var ix = findTxIndex(e); |
| 644 | - var dest = branchHyperlink(ix) | |
| 645 | 645 | hideGraphTooltip() |
| 646 | - window.location.href = dest | |
| 646 | + if( ix>=0 ){ | |
| 647 | + var dest = branchHyperlink(ix) | |
| 648 | + window.location.href = dest | |
| 649 | + } | |
| 647 | 650 | } |
| 648 | 651 | function changeDisplay(selector,value){ |
| 649 | 652 | var x = document.getElementsByClassName(selector); |
| 650 | 653 | var n = x.length; |
| 651 | 654 | for(var i=0; i<n; i++) {x[i].style.display = value;} |
| 652 | 655 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -599,10 +599,11 @@ | |
| 599 | if( tx.fileDiff ){ |
| 600 | html = "artifact <a href=\""+dest+"\">"+h+"</a>" |
| 601 | }else{ |
| 602 | html = "check-in <a href=\""+dest+"\">"+h+"</a>" |
| 603 | } |
| 604 | }else if( tooltipInfo.ixHover>=0 ){ |
| 605 | ix = tooltipInfo.ixHover |
| 606 | var br = tx.rowinfo[ix].br |
| 607 | var dest = branchHyperlink(ix) |
| 608 | var hbr = br.replace(/&/g, "&") |
| @@ -639,13 +640,15 @@ | |
| 639 | hideGraphTooltip() |
| 640 | } |
| 641 | } |
| 642 | function dblclickOnGraph(e){ |
| 643 | var ix = findTxIndex(e); |
| 644 | var dest = branchHyperlink(ix) |
| 645 | hideGraphTooltip() |
| 646 | window.location.href = dest |
| 647 | } |
| 648 | function changeDisplay(selector,value){ |
| 649 | var x = document.getElementsByClassName(selector); |
| 650 | var n = x.length; |
| 651 | for(var i=0; i<n; i++) {x[i].style.display = value;} |
| 652 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -599,10 +599,11 @@ | |
| 599 | if( tx.fileDiff ){ |
| 600 | html = "artifact <a href=\""+dest+"\">"+h+"</a>" |
| 601 | }else{ |
| 602 | html = "check-in <a href=\""+dest+"\">"+h+"</a>" |
| 603 | } |
| 604 | tooltipInfo.ixActive = -2; |
| 605 | }else if( tooltipInfo.ixHover>=0 ){ |
| 606 | ix = tooltipInfo.ixHover |
| 607 | var br = tx.rowinfo[ix].br |
| 608 | var dest = branchHyperlink(ix) |
| 609 | var hbr = br.replace(/&/g, "&") |
| @@ -639,13 +640,15 @@ | |
| 640 | hideGraphTooltip() |
| 641 | } |
| 642 | } |
| 643 | function dblclickOnGraph(e){ |
| 644 | var ix = findTxIndex(e); |
| 645 | hideGraphTooltip() |
| 646 | if( ix>=0 ){ |
| 647 | var dest = branchHyperlink(ix) |
| 648 | window.location.href = dest |
| 649 | } |
| 650 | } |
| 651 | function changeDisplay(selector,value){ |
| 652 | var x = document.getElementsByClassName(selector); |
| 653 | var n = x.length; |
| 654 | for(var i=0; i<n; i++) {x[i].style.display = value;} |
| 655 |