Skip to content

Commit 6aa0c59

Browse files
author
kirbIndustries
authored
Update index.js
1 parent a7a4f11 commit 6aa0c59

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

js/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14081,6 +14081,7 @@ function setupDrawerInteractions() {
1408114081
const drawerHandle = document.querySelector('.drawer-handle');
1408214082
const appDrawerHandle = document.querySelector('.app-drawer-handle');
1408314083
const swipeOverlay = document.getElementById('swipe-overlay');
14084+
const zoom = (parseFloat(document.body.style.zoom) || 100) / 100;
1408414085

1408514086
// Save original states
1408614087
const origDH = drawerHandle ? drawerHandle.style.pointerEvents : '';
@@ -14101,7 +14102,7 @@ function setupDrawerInteractions() {
1410114102
el.style.pointerEvents = 'auto';
1410214103
});
1410314104

14104-
const el = document.elementFromPoint(x, y);
14105+
const el = document.elementFromPoint(x / zoom, y / zoom);
1410514106

1410614107
// Find the correct iframe (direct hit, or inside the specific embed wrapper we hit)
1410714108
let targetIframe = null;
@@ -14111,13 +14112,13 @@ function setupDrawerInteractions() {
1411114112
targetIframe = el.querySelector('iframe');
1411214113
}
1411314114

14114-
if (targetIframe && targetIframe.contentWindow) {
14115+
if (targetIframe && targetIframe.contentWindow) {
1411514116
// Forward to Gurapp
1411614117
const rect = targetIframe.getBoundingClientRect();
1411714118
targetIframe.contentWindow.postMessage({
1411814119
type: 'forward-click',
14119-
x: x - rect.left,
14120-
y: y - rect.top
14120+
x: (x - rect.left) / zoom,
14121+
y: (y - rect.top) / zoom
1412114122
}, '*');
1412214123
} else if (el) {
1412314124
// System Support - Trigger native click on parent DOM elements (Dock, Home UI, etc.)

0 commit comments

Comments
 (0)