fix the treesize off-by-one (*finally*)

This commit is contained in:
ed 2021-05-18 03:21:53 +02:00
parent 03d692db66
commit 58040cc0ed
2 changed files with 4 additions and 4 deletions

View file

@ -527,7 +527,6 @@ input[type="checkbox"]:checked+label {
left: 0;
bottom: 0;
top: 7em;
padding-top: .2em;
overflow-y: auto;
-ms-scroll-chaining: none;
overscroll-behavior-y: none;
@ -575,6 +574,7 @@ input[type="checkbox"]:checked+label {
#detree {
padding: .3em .5em;
font-size: 1.5em;
line-height: 1.5em;
}
#tree ul,
#tree li {

View file

@ -147,7 +147,7 @@ var widget = (function () {
irc = this.getAttribute('id') == 'npirc',
ck = irc ? '06' : '',
cv = irc ? '07' : '',
m = ck + 'np: ' + cv;
m = ck + 'np: ';
for (var a = 1, aa = th.length; a < aa; a++) {
var tk = a == 1 ? '' : th[a].getAttribute('name').split('/').slice(-1)[0];
@ -158,7 +158,7 @@ var widget = (function () {
m += '[' + cv + s2ms(mp.au.currentTime) + ck + '/' + cv + s2ms(mp.au.duration) + ck + ']';
var o = document.createElement('input');
o.style.cssText = 'position:fixed;top:45%;left:48%;padding:1em';
o.style.cssText = 'position:fixed;top:45%;left:48%;padding:1em;z-index:9';
o.value = m;
document.body.appendChild(o);
o.focus();
@ -1040,7 +1040,7 @@ var treectl = (function () {
}
else {
var top = Math.max(0, parseInt(wrap.offsetTop)),
treeh = (winh - atop) - 4;
treeh = winh - atop;
tree.style.top = top + 'px';
tree.style.height = treeh < 10 ? '' : treeh + 'px';