Position popover properly on a scrolled page

Not needed in the core editor, but needed in the docs pages that can scroll
This commit is contained in:
Nick O'Leary 2021-10-19 22:22:53 +01:00
parent 8d79deffb5
commit 7610353f07
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 1 additions and 1 deletions

View File

@ -603,7 +603,7 @@ RED.popover = (function() {
var panelWidth = panel.width();
var top = (targetHeight+pos.top) + offset[1];
if (top+panelHeight > $(window).height()) {
if (top+panelHeight-$(document).scrollTop() > $(window).height()) {
top -= (top+panelHeight)-$(window).height() + 5;
}
if (top < 0) {