Editor keeps scrolling after a drag ends

Obsidian 1.14.5 (installer 1.14.4), Linux, AppImage.

When a drag leaves the browser window, onDragLeave fails to cancel the active edgeScroll animation frame. If the subsequent dragend event never fires on the source element, the scroller continues scrolling indefinitely (even when the window is unfocused) until it hits its limit.

Steps to Reproduce

  1. Start dragging an element and hover within 50px of a scroll container’s edge to trigger auto-scrolling.

  2. Move the pointer completely out of the browser window before releasing the drag (preventing the source element from receiving dragend).

Expected Behavior

edgeScroll and its associated requestAnimationFrame should be canceled whenever the drag session terminates, including when onDragLeave handles the pointer leaving the window.

Actual Behavior

  • The drag session state clears (ghost detaches, hover clears, body loses is-grabbing), but edgeScroll remains active (e.g., { dir: "up", speed: ..., targetEl: ... }).

  • The container continuously updates scrollTop at the last recorded speed until reaching the boundary.

  • Manually cancelling the frame and resetting edgeScroll to null successfully halts the loop.