Schedule/fix bar drag trailing click - #2183
Open
Chantology wants to merge 2 commits into
Open
Conversation
A native click still fires on mouseup whenever mousedown and mouseup land on the same element, drag or not, so finishing a move on a schedule bar always re-fired root-element-selected / item-selected / task-selected on top of the drag itself. For a task-type row that re-triggered the same handler used to expand it, unfolding the row on every move.
Three comments explained the same click-after-drag mechanism; kept it in one place and trimmed the others to what's non-obvious at each spot.
Chantology
marked this pull request as ready for review
August 19, 2026 16:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dragging a schedule bar (department/task-type row, entity row, or a person's task) always fired a trailing click on top of the drag itself, because a native click still fires on mouseup whenever mousedown and mouseup land on the same element, regardless of pointer movement in between.
For a task-type row (e.g. Asset/Rigging), that trailing click re-triggered
root-element-selected, which expands the row — so moving the bar unfolded it every time.The same pattern also re-fired
item-selectedon entity rows andtask-selectedon a person's task bars.Solution
stopBrowsingnow flags when it detects real pointer movement during a drag.New
onRootBarClick/onChildBarClick/onTaskBarClickhandlers consume that flag once and skip the select/expand event for the trailing click only; a genuine no-movement click still works as before.Added a test that drives a real
mousedown → mousemove → mouseup → clicksequence and is confirmed to fail before the fix, pass after.Comment
I am not 100% sure if this patch is against anything that is intended. It felt a bit annoying when the tasks always collapse as soon as I move a task schedule and reveal everything below. Sometimes you just want to move timelines and not always look on whats underneath. There is a pop up message in case you are changing anything drastically that would affect start dates and end dates below. Then you can collapse the tasks yourself.