mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
prevent tooltips on alt-tab
This commit is contained in:
parent
b65bea2550
commit
4d8b32b249
|
@ -688,6 +688,14 @@ var tt = (function () {
|
||||||
r.tt.setAttribute('id', 'tt');
|
r.tt.setAttribute('id', 'tt');
|
||||||
document.body.appendChild(r.tt);
|
document.body.appendChild(r.tt);
|
||||||
|
|
||||||
|
var prev = null;
|
||||||
|
r.cshow = function () {
|
||||||
|
if (this !== prev)
|
||||||
|
r.show.bind(this)();
|
||||||
|
|
||||||
|
prev = this;
|
||||||
|
};
|
||||||
|
|
||||||
r.show = function () {
|
r.show = function () {
|
||||||
if (r.skip) {
|
if (r.skip) {
|
||||||
r.skip = false;
|
r.skip = false;
|
||||||
|
@ -770,12 +778,13 @@ var tt = (function () {
|
||||||
r.tt.onclick = r.hide;
|
r.tt.onclick = r.hide;
|
||||||
|
|
||||||
r.att = function (ctr) {
|
r.att = function (ctr) {
|
||||||
var _show = r.en ? r.show : null,
|
var _cshow = r.en ? r.cshow : null,
|
||||||
|
_show = r.en ? r.show : null,
|
||||||
_hide = r.en ? r.hide : null,
|
_hide = r.en ? r.hide : null,
|
||||||
o = ctr.querySelectorAll('*[tt]');
|
o = ctr.querySelectorAll('*[tt]');
|
||||||
|
|
||||||
for (var a = o.length - 1; a >= 0; a--) {
|
for (var a = o.length - 1; a >= 0; a--) {
|
||||||
o[a].onfocus = _show;
|
o[a].onfocus = _cshow;
|
||||||
o[a].onblur = _hide;
|
o[a].onblur = _hide;
|
||||||
o[a].onmouseenter = _show;
|
o[a].onmouseenter = _show;
|
||||||
o[a].onmouseleave = _hide;
|
o[a].onmouseleave = _hide;
|
||||||
|
|
Loading…
Reference in a new issue