You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e44c639
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/web/src/hooks/useHtmlRenderPointerHold.ts
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,13 @@ export function useHtmlRenderPointerHold(frameRef: RefObject<HTMLIFrameElement |
10
10
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- bridges pointer releases across sandboxed frames and their host before the page can report a hold
11
11
useLayoutEffect(()=>{
12
12
letheld=false;
13
+
constframe=frameRef.current;
14
+
constonLoad=()=>{
15
+
if(!held)return;
16
+
held=false;
17
+
setPointerHeld(false);
18
+
};
19
+
frame?.addEventListener("load",onLoad);
13
20
constrelease=(event: Event)=>{
14
21
if(
15
22
!held||
@@ -55,6 +62,7 @@ export function useHtmlRenderPointerHold(frameRef: RefObject<HTMLIFrameElement |
0 commit comments