Skip to content
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

Fix "click outside + immediate editor commit" edge case by swiching to checking for mousedown events #2415

Merged
merged 2 commits into from
May 20, 2021

Conversation

nstepien
Copy link
Contributor

Related: #2414

I had also tried to fix this by adding an extra "sync" check on the bubble phase of the click event, but that wouldn't work as the click on the external save button would happen first, and thus wouldn't get the updated state.

@nstepien nstepien self-assigned this May 19, 2021
@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #2415 (becab00) into canary (d8db38d) will decrease coverage by 0.00%.
The diff coverage is 38.46%.

@@            Coverage Diff             @@
##           canary    #2415      +/-   ##
==========================================
- Coverage   70.50%   70.50%   -0.01%     
==========================================
  Files          39       39              
  Lines        3618     3617       -1     
  Branches      316      316              
==========================================
- Hits         2551     2550       -1     
  Misses       1067     1067              
Impacted Files Coverage Δ
src/hooks/useMouseDownOutside.ts 55.43% <26.31%> (ø)
src/editors/EditorContainer.tsx 39.39% <33.33%> (ø)
src/hooks/index.ts 100.00% <100.00%> (ø)

@nstepien nstepien enabled auto-merge (squash) May 20, 2021 13:06
Copy link
Contributor

@amanmahajan7 amanmahajan7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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