fix tabchange triggering tooltips

This commit is contained in:
ed 2021-07-18 23:21:36 +02:00
parent f4ca62b664
commit b0c78910bb
2 changed files with 10 additions and 2 deletions

View file

@ -177,8 +177,10 @@ function opclick(e) {
goto(dest); goto(dest);
var input = QS('.opview.act input:not([type="hidden"])') var input = QS('.opview.act input:not([type="hidden"])')
if (input && !is_touch) if (input && !is_touch) {
tt.skip = true;
input.focus(); input.focus();
}
} }

View file

@ -503,13 +503,19 @@ var tt = (function () {
var r = { var r = {
"tt": mknod("div"), "tt": mknod("div"),
"en": true, "en": true,
"el": null "el": null,
"skip": false
}; };
r.tt.setAttribute('id', 'tt'); r.tt.setAttribute('id', 'tt');
document.body.appendChild(r.tt); document.body.appendChild(r.tt);
r.show = function () { r.show = function () {
if (r.skip) {
r.skip = false;
return;
}
var cfg = sread('tooltips'); var cfg = sread('tooltips');
if (cfg !== null && cfg != '1') if (cfg !== null && cfg != '1')
return; return;