apply window scroll offset to copied notification offset (#1550)

resolves #1549
This commit is contained in:
chewsta 2020-05-08 06:35:25 +10:00 committed by GitHub
parent aff91f49ef
commit 55f416c48c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,7 @@
function copyElement(trigger, popupLeftModifier, popupTopModifier) {
var elm = $(trigger);
var position = elm.offset();
position.top -= popupLeftModifier;
position.top -= popupLeftModifier + $(window).scrollTop();
position.left += (elm.width() / 2) - popupTopModifier;
$(".copyLabelPopup").css(position).addClass("copied");
elm.removeClass("copy-cursor").addClass("clipboardCopied");