Fossil SCM
Web SBS diff: Was incorrectly using the scrollWidths of the div containers rather than that of the pre elements themselves.
Commit
325ed34e4549e9a6331969c0a71ac13bc83988e6
Parent
af9bda81e4877d1…
1 file changed
+3
-2
+3
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -397,13 +397,14 @@ | ||
| 397 | 397 | if( !sideBySide ) return; |
| 398 | 398 | @ <script>(function(){ |
| 399 | 399 | @ var SCROLL_LEN = 25; |
| 400 | 400 | @ function initSbsDiff(diff){ |
| 401 | 401 | @ var txtCols = diff.querySelectorAll('.difftxtcol'); |
| 402 | - @ var width = Math.max(txtCols[0].scrollWidth, txtCols[1].scrollWidth); | |
| 402 | + @ var txtPres = diff.querySelectorAll('.difftxtcol pre'); | |
| 403 | + @ var width = Math.max(txtPres[0].scrollWidth, txtPres[1].scrollWidth); | |
| 403 | 404 | @ for(var i=0; i<2; i++){ |
| 404 | - @ txtCols[i].children[0].style.width = width + 'px'; | |
| 405 | + @ txtPres[i].style.width = width + 'px'; | |
| 405 | 406 | @ txtCols[i].onscroll = function(e){ |
| 406 | 407 | @ txtCols[0].scrollLeft = txtCols[1].scrollLeft = this.scrollLeft; |
| 407 | 408 | @ }; |
| 408 | 409 | @ } |
| 409 | 410 | @ diff.tabIndex = 0; |
| 410 | 411 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -397,13 +397,14 @@ | |
| 397 | if( !sideBySide ) return; |
| 398 | @ <script>(function(){ |
| 399 | @ var SCROLL_LEN = 25; |
| 400 | @ function initSbsDiff(diff){ |
| 401 | @ var txtCols = diff.querySelectorAll('.difftxtcol'); |
| 402 | @ var width = Math.max(txtCols[0].scrollWidth, txtCols[1].scrollWidth); |
| 403 | @ for(var i=0; i<2; i++){ |
| 404 | @ txtCols[i].children[0].style.width = width + 'px'; |
| 405 | @ txtCols[i].onscroll = function(e){ |
| 406 | @ txtCols[0].scrollLeft = txtCols[1].scrollLeft = this.scrollLeft; |
| 407 | @ }; |
| 408 | @ } |
| 409 | @ diff.tabIndex = 0; |
| 410 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -397,13 +397,14 @@ | |
| 397 | if( !sideBySide ) return; |
| 398 | @ <script>(function(){ |
| 399 | @ var SCROLL_LEN = 25; |
| 400 | @ function initSbsDiff(diff){ |
| 401 | @ var txtCols = diff.querySelectorAll('.difftxtcol'); |
| 402 | @ var txtPres = diff.querySelectorAll('.difftxtcol pre'); |
| 403 | @ var width = Math.max(txtPres[0].scrollWidth, txtPres[1].scrollWidth); |
| 404 | @ for(var i=0; i<2; i++){ |
| 405 | @ txtPres[i].style.width = width + 'px'; |
| 406 | @ txtCols[i].onscroll = function(e){ |
| 407 | @ txtCols[0].scrollLeft = txtCols[1].scrollLeft = this.scrollLeft; |
| 408 | @ }; |
| 409 | @ } |
| 410 | @ diff.tabIndex = 0; |
| 411 |