mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
fix scroll sync on osx ff/chrome
This commit is contained in:
parent
5d6a740947
commit
27cb1d4fc7
|
@ -45,9 +45,12 @@
|
|||
color: #444;
|
||||
background: #f7f7f7;
|
||||
border: 1px solid #999;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: 'consolas', monospace, monospace;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word; /*ie*/
|
||||
overflow-y: scroll;
|
||||
|
@ -62,8 +65,8 @@ html.dark #mt {
|
|||
}
|
||||
#mtr {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#save.force-save {
|
||||
color: #400;
|
||||
|
@ -98,8 +101,4 @@ html.dark #helpbox {
|
|||
border-width: 1px 0;
|
||||
}
|
||||
|
||||
/* dbg:
|
||||
#mt {
|
||||
opacity: .5;
|
||||
}
|
||||
*/
|
||||
# mt {opacity: .5;top:1px}
|
||||
|
|
|
@ -48,6 +48,10 @@ function genmap(dom) {
|
|||
while (ln > ret.length)
|
||||
ret.push(null);
|
||||
|
||||
if (parent_y == 0 && n.offsetTop == 0)
|
||||
//console.log('awawa');
|
||||
continue;
|
||||
|
||||
ret.push(parent_y + n.offsetTop);
|
||||
}
|
||||
return ret;
|
||||
|
@ -99,7 +103,7 @@ redraw = (function () {
|
|||
var y = (dom_hbar.offsetTop + dom_hbar.offsetHeight) + 'px';
|
||||
dom_wrap.style.top = y;
|
||||
dom_swrap.style.top = y;
|
||||
dom_ref.style.width = (dom_src.offsetWidth - 4) + 'px';
|
||||
dom_ref.style.width = getComputedStyle(dom_src).offsetWidth + 'px';
|
||||
map_src = genmap(dom_ref);
|
||||
map_pre = genmap(dom_pre);
|
||||
dbg(document.body.clientWidth + 'x' + document.body.clientHeight);
|
||||
|
@ -615,3 +619,14 @@ action_stack = (function () {
|
|||
_ref: ref
|
||||
}
|
||||
})();
|
||||
|
||||
/*
|
||||
document.getElementById('help').onclick = function () {
|
||||
var c1 = getComputedStyle(dom_src).cssText.split(';');
|
||||
var c2 = getComputedStyle(dom_ref).cssText.split(';');
|
||||
var max = Math.min(c1.length, c2.length);
|
||||
for (var a = 0; a < max; a++)
|
||||
if (c1[a] !== c2[a])
|
||||
console.log(c1[a] + '\n' + c2[a]);
|
||||
}
|
||||
*/
|
Loading…
Reference in a new issue