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

Race condition on time selection fixed #1428

Closed
wants to merge 1 commit into from
Closed

Race condition on time selection fixed #1428

wants to merge 1 commit into from

Conversation

Genarito
Copy link

There was a race condition on time selection: handleTimeChange and handleFocus set open variable in the opposite way. If handleFocus ran last, calendar sometimes stayed opened.

Before

ezgif com-video-to-gif

Now

ezgif com-video-to-gif 1

As we can not manage events order excecution, I add an imperceptible timeout in handleTimeChange to ensure that It sets open variable last.

@codecov
Copy link

codecov bot commented Jul 20, 2018

Codecov Report

Merging #1428 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1428     +/-   ##
=========================================
+ Coverage   89.14%   89.34%   +0.2%     
=========================================
  Files          16       16             
  Lines        1059     1061      +2     
  Branches      175      175             
=========================================
+ Hits          944      948      +4     
+ Misses         22       21      -1     
+ Partials       93       92      -1
Impacted Files Coverage Δ
src/index.jsx 91.82% <100%> (+0.07%) ⬆️
src/time.jsx 85.18% <0%> (+3.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93c46ed...8a51bb3. Read the comment docs.

@Genarito
Copy link
Author

Ok, it can be fixed as explained in this issue: setting preventOpenFocus={true} on Datepicker component.

@Genarito Genarito closed this Jul 31, 2018
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.

None yet

1 participant