Skip to content

Fix/overlay stale resize cursor - #1322

Merged
mstijak merged 2 commits into
masterfrom
fix/overlay-stale-resize-cursor
Sep 3, 2026
Merged

Fix/overlay stale resize cursor#1322
mstijak merged 2 commits into
masterfrom
fix/overlay-stale-resize-cursor

Conversation

@jelic-nikola

Copy link
Copy Markdown
Contributor

Problem

Hovering the edge of a resizable window switched the cursor to a resize cursor,
but moving back into the window left it there. The window kept showing a resize
cursor over its content until something else changed it.

Fix

The cursor is now removed when the pointer moves off the edge, falling back to
whatever the window declares: an inline cursor from its style, or the cursor
from its CSS class.

The previous code assigned undefined, which browsers ignore, so the resize
cursor was never cleared.

Testing

Checked by hand in Litmus
(litmus/features/window/resize-cursor.js) with a draggable + resizable window
and a resizable window with an inline cursor: hovering onto and off the edges,
resizing, and dragging. Type check and the test suite pass.

Moving off a resizable overlay's edge attempted to clear the cursor by
assigning `cursor: undefined` through `Object.assign(el.style, ...)`.
The CSSOM ignores this as an invalid value, causing the resize cursor to
remain on the element and continue showing over the window content.

Remove the cursor from `customStyle` instead, then reset the element's
inline cursor to the declared `style.cursor`, or clear it so class-based
rules can apply again.

Guard the reset so the DOM is only touched when a resize cursor was
actually set.
Two resizable windows for checking the resize cursor by hand: one
draggable, taking its base cursor from the CSS class, and one with an
inline cursor in its style.
@jelic-nikola
jelic-nikola requested a review from mstijak September 3, 2026 12:22
@jelic-nikola jelic-nikola self-assigned this Sep 3, 2026
@mstijak
mstijak merged commit 706a963 into master Sep 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants