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
A cancelled drag leaves the end-stop slider editing, so it shows a stale stop and keeps hover controls open #695
When SwiftUI cancels a drag on a slider with an end stop (such as "endStop": {"value": 0, "label": "∞"}) instead of ending it, the slider stays in its editing state:
It ignores outside changes to its value, such as Undo or a configuration reload, and keeps showing the stop it was dragged to.
It keeps reporting that it is being edited, so hover controls that contain it stay expanded after the pointer leaves.
Steps to reproduce
Give a widget a hoverLayout slider with an endStop.
Start dragging the slider, then have SwiftUI cancel the drag before the mouse button is released, for example by disabling the slider mid-drag. In a running bar with inline hover controls, switching apps, right-clicking, pressing Escape or reloading the configuration mid-drag did not cancel the drag, so the user actions that reach this path are not pinned down yet.
Change the slider's source value from outside, or move the pointer away from the widget.
Expected
A cancelled drag sends nothing, the knob goes back to the source's value, and the hover controls can collapse, as a filled slider already does.
A hosted-view test that drives the real DragGesture with mouse events, then disables the slider mid-drag, shows that the editing preference stays true after the cancel. A completed drag commits its value as expected.
Diagnosis
Sources/StableBar/EndStopSlider.swift resets editing only in finish(), which the drag gesture's onEnded calls. SwiftUI skips onEnded when it cancels a gesture, so editing stays true. Then:
.onChange(of: value) { if !editing { dragged = nil } } never clears the dragged stop.
.preference(key: ControlEditingPreference.self, value: editing) keeps publishing true, which HoverLayoutView reads to stay expanded.
Sources/StableBar/FilledSlider.swift already handles this: a @GestureState dragging resets however the drag ends, and .onChange(of: dragging) drops a drag that ended without onEnded.
Activity
stablebar-releases commentedon Nov 16, 2026
🎉 This issue has been resolved in version 0.17.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀