Skip to content

Conversation

@gilbsgilbs
Copy link

Fixes #1550

Disclaimer: this fix is probably very naive and I make it for the sole purpose of bringing attention of contributors and maintainers on this bug that has been around for way too long now. Given that neither of:

  • the very long comment
  • the git commit history
  • the tests
  • my very dysfunctional brain

are of any help at understanding why relatedTarget was looked for in the first place, and given that it introduces a bug in the appendToBody={true} case, this is the most logical PR I could come up with.

@gilbsgilbs
Copy link
Author

By the way, a less controversial fix might be what I suggested here about a year ago.

@Thorvarium
Copy link

This is happening in my project as well

@ljharb ljharb force-pushed the fix-appendtobody-singledatepicker branch from c0f332d to e34fc2f Compare December 1, 2021 05:57
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

I am very concerned about removing what the comment implies is a workaround for IE < 11, or other older browsers.

@ljharb ljharb marked this pull request as draft December 1, 2021 05:58
@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #1890 (e34fc2f) into master (57cba2f) will increase coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1890      +/-   ##
==========================================
+ Coverage   79.99%   80.06%   +0.06%     
==========================================
  Files          57       57              
  Lines        2299     2297       -2     
  Branches      638      636       -2     
==========================================
  Hits         1839     1839              
+ Misses        271      269       -2     
  Partials      189      189              
Impacted Files Coverage Δ
src/components/SingleDatePicker.jsx 65.95% <0.00%> (+1.37%) ⬆️

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 57cba2f...e34fc2f. Read the comment docs.

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.

appendToBody property breaks date selection in SingleDatePicker when in a Material-UI Dialog

3 participants