Skip to content

Commit

Permalink
Fix erroneous divOffsetHeight calc for Electron
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed May 17, 2024
1 parent 2357808 commit b70cb02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/js/lib/uiUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ function attachKiwixPopoverDiv (ev, link, articleBaseUrl, dark) {
var linkRect = link.getBoundingClientRect();
// Initially position the div 20px above the link
var triangleDirection = 'top';
var divOffsetHeight = /UWP/.test(params.appType) ? div.offsetHeight * params.relativeFontSize / 100 + 20 : div.offsetHeight - 20;
var divOffsetHeight = /UWP/.test(params.appType) ? div.offsetHeight * params.relativeFontSize / 100 + 20 : div.offsetHeight + 20;
var divRectY = linkRect.top - divOffsetHeight;
if (/UWP/.test(params.appType)) divRectY = divRectY * 100 / params.relativeFontSize;
var triangleY = divHeight + 6;
Expand Down

0 comments on commit b70cb02

Please sign in to comment.