Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix help position after scroll

  • Loading branch information...
commit 2b78d06646a20cb21393a17e74542869acc7c58d 1 parent 1088cc5
@vrana authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 adminer/static/editing.js
View
5 adminer/static/editing.js
@@ -584,8 +584,9 @@ function helpMouseover(el, event, text, side) {
jush.highlight_tag([ help ]);
alterClass(help, 'hidden');
var rect = target.getBoundingClientRect();
- help.style.top = (rect.top - (side ? (help.offsetHeight - target.offsetHeight) / 2 : help.offsetHeight)) + 'px';
- help.style.left = (rect.left - (side ? help.offsetWidth : (help.offsetWidth - target.offsetWidth) / 2)) + 'px';
+ var body = document.documentElement;
+ 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';
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.