New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset mouseSelectionInProgress synchronously on mouseUp #1435

merged 1 commit into from May 4, 2018


None yet
1 participant

smashwilson commented May 4, 2018

This is a speculative fix for an issue where FilePatch items will pop open unpredictably on mouseup even while no StagingView mouse selection is in progress. It's difficult to reproduce or test because it relies on internal React rendering pipeline behavior.

If the setState() call within the mouseup handler is batched with other state transitions by React, a race condition could prevent this.mouseSelectionInProgress from being set to false correctly. Toggling off this.mouseSelectionInProgress before the first "await" should prevent this from triggering.

@smashwilson smashwilson merged commit fbaf0d4 into master May 4, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@smashwilson smashwilson deleted the aw/stop-selection-sync branch May 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment