react-dates icon indicating copy to clipboard operation
react-dates copied to clipboard

Fix SingleDatePicker when appendToBody is enabled.

Open gilbsgilbs opened this issue 6 years ago • 3 comments

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 avatar Dec 31 '19 14:12 gilbsgilbs

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

gilbsgilbs avatar Jan 01 '20 15:01 gilbsgilbs

This is happening in my project as well

Thorvarium avatar Apr 19 '21 18:04 Thorvarium

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%) :arrow_up:

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.

codecov[bot] avatar Dec 01 '21 06:12 codecov[bot]