File tree Expand file tree Collapse file tree
frontend/src/components/widgets/inputs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 325325 if (alreadyActedGuard ) return ;
326326 alreadyActedGuard = true ;
327327 isDragging = true ;
328- beginDrag (e );
328+
329+ // We need to request pointer lock as immediately as possible for Safari compatibility
330+ const target = e .target || undefined ;
331+ if (! (target instanceof HTMLElement )) return ;
332+
333+ target .requestPointerLock ();
334+
335+ beginDrag ();
329336 removeEventListener (" pointermove" , onMove );
330337 };
331338 // If it's a mouseup, we'll begin editing the text field.
340347 addEventListener (" pointerup" , onUp );
341348 }
342349
343- function beginDrag(e : PointerEvent ) {
344- // Get the click target
345- const target = e .target || undefined ;
346- if (! (target instanceof HTMLElement )) return ;
347-
348- // Enter dragging state
349- target .requestPointerLock ();
350+ function beginDrag() {
350351 initialValueBeforeDragging = value ;
351352 cumulativeDragDelta = 0 ;
352353
You can’t perform that action at this time.
0 commit comments