improve iphone fix

This commit is contained in:
ed 2021-08-28 02:11:40 +02:00
parent b4590c5398
commit af0a34cf82
3 changed files with 12 additions and 11 deletions

View file

@ -2221,7 +2221,7 @@ var thegrid = (function () {
r.setdirty();
};
var links = QSA('#ghead>a');
var links = QSA('#ghead a');
for (var a = 0; a < links.length; a++)
links[a].onclick = btnclick;

View file

@ -1890,10 +1890,6 @@ function up2k_init(subtle) {
if (o)
o.addEventListener('click', tgl_fsearch, false);
var nodes = ebi('u2conf').getElementsByTagName('a');
for (var a = nodes.length - 1; a >= 0; a--)
nodes[a].addEventListener('touchend', nop, false);
ebi('u2etas').onclick = function () {
clmod(ebi('u2etas'), 'o', 't');
};

View file

@ -592,6 +592,8 @@ var tt = (function () {
r.skip = false;
return;
}
if (QS('body.bbox-open'))
return;
var cfg = sread('tooltips');
if (cfg !== null && cfg != '1')
@ -612,18 +614,21 @@ var tt = (function () {
clmod(r.tt, 'b', big);
r.tt.style.maxWidth = '';
r.tt.style.left = '0';
r.tt.style.top = '0';
r.tt.innerHTML = msg.replace(/\$N/g, "<br />");
var tw = r.tt.offsetWidth,
x = pos.left + (pos.right - pos.left) / 2 - tw / 2;
if (x < 0)
x = 0;
x = 8;
if (x + tw > window.innerWidth) {
if (!x)
r.tt.style.maxWidth = window.innerWidth + 'px';
if (x <= 8)
r.tt.style.maxWidth = (window.innerWidth - 16) + 'px';
else
x = window.innerWidth - tw;
x = window.innerWidth - tw - 8;
}
r.tt.style.left = x + 'px';
@ -646,10 +651,10 @@ var tt = (function () {
f2 = r.hide;
r.show = function () {
setTimeout(f1.bind(this), 301);
setTimeout(f1.bind(this), 101);
};
r.hide = function () {
setTimeout(f2.bind(this), 301);
setTimeout(f2.bind(this), 101);
};
}