# Editor keeps scrolling after a drag ends

**URL:** <https://forum.obsidian.md/t/editor-keeps-scrolling-after-a-drag-ends/120055>\
**Category:** Bug reports\
**Tags:** editor, ui-ux\
**Created:** [October 31, 2026, 7:07pm UTC](https://forum.obsidian.md/t/editor-keeps-scrolling-after-a-drag-ends/120055 "2026-10-31T19:07:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mycoJuan](https://forum.obsidian.md/user_avatar/forum.obsidian.md/mycojuan/32/36674_2.png) [@mycoJuan](https://forum.obsidian.md/u/mycoJuan)\
**Post date:** [October 31, 2026, 7:07pm UTC](https://forum.obsidian.md/t/editor-keeps-scrolling-after-a-drag-ends/120055/1 "2026-10-31T19:07:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kilphy.4096](https://forum.obsidian.md/user_avatar/forum.obsidian.md/kilphy.4096/32/98753_2.png) [@kilphy.4096](https://forum.obsidian.md/u/kilphy.4096)\
**Post date:** [November 26, 2026, 5:57am UTC](https://forum.obsidian.md/t/editor-keeps-scrolling-after-a-drag-ends/120055/2 "2026-11-26T05:57:01Z")

</div>

Same here on macOS: Obsidian 1.15.1, reproduced in the sandbox vault (no community plugins, default theme).

An even simpler trigger: the drag doesn’t have to start in Obsidian at all. Dragging an image from Finder to Terminal and crossing the Obsidian window on the way is enough. Since the drag didn’t start inside Obsidian, no `dragend` listener is attached, and the last `dragover` before the pointer leaves the window is usually within the edge zone, so `edgeScroll` keeps running. Clicking, hovering, or switching notes doesn’t stop it; only a restart or dragging something over the window again does.

Steps:

1. Open a note long enough to scroll.
2. Drag an image from Finder across the Obsidian window into Terminal (or any other app) and drop it there.
3. The note keeps scrolling (only downward, not upward).

Workaround I’m using: a small plugin that sets `app.dragManager.edgeScroll` to null (and cancels its frame) on window `dragleave` / `drop` / `dragend` / `mousemove`.

```auto
SYSTEM INFO:
	Obsidian version: 1.15.1
	Installer version: 1.8.10
	Operating system: Darwin Kernel Version 25.6.0: Mon Oct 12 00:41:28 PDT 2026; root:xnu-12377.161.15.701.48~2/RELEASE_ARM64_T8132 25.6.0
	Login status: not logged in
	Language: ja
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: Typewriter 2.2.5
	Snippets enabled: 2
	Restricted mode: off
	Plugins installed: 5
	Plugins enabled: 4
		1: Calendar v1.5.10
		2: Templater v2.19.0
		3: Path Tab Complete v0.1.0
		4: Drag Edge Scroll Fix v0.1.0

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

```
