mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Fix help position after scroll
This commit is contained in:
@@ -584,8 +584,9 @@ function helpMouseover(el, event, text, side) {
|
|||||||
jush.highlight_tag([ help ]);
|
jush.highlight_tag([ help ]);
|
||||||
alterClass(help, 'hidden');
|
alterClass(help, 'hidden');
|
||||||
var rect = target.getBoundingClientRect();
|
var rect = target.getBoundingClientRect();
|
||||||
help.style.top = (rect.top - (side ? (help.offsetHeight - target.offsetHeight) / 2 : help.offsetHeight)) + 'px';
|
var body = document.documentElement;
|
||||||
help.style.left = (rect.left - (side ? help.offsetWidth : (help.offsetWidth - target.offsetWidth) / 2)) + 'px';
|
help.style.top = (body.scrollTop + rect.top - (side ? (help.offsetHeight - target.offsetHeight) / 2 : help.offsetHeight)) + 'px';
|
||||||
|
help.style.left = (body.scrollLeft + rect.left - (side ? help.offsetWidth : (help.offsetWidth - target.offsetWidth) / 2)) + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user