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

fix: add tab loop to datepicker with withPortal

Open pablo-abc opened this issue 3 years ago • 2 comments

I'm currently using this date picker with the withPortal prop. I noticed that currently, when rendered like this, there is no TabLoop enabled at all which allows you to tab out of the date picker under the overlay. This PR uses the TabLoop component to wrap the portal's contents.

This PR also adds a keyDown handler to allow to close the date picker using the Escape key. (It was ignored previously, particularly when focus was in the header).

pablo-abc avatar Jun 01 '22 00:06 pablo-abc

Codecov Report

Merging #3648 (5b0b16a) into master (79a61c3) will decrease coverage by 0.27%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #3648      +/-   ##
==========================================
- Coverage   93.34%   93.06%   -0.28%     
==========================================
  Files          20       20              
  Lines        1352     1356       +4     
  Branches      377      378       +1     
==========================================
  Hits         1262     1262              
- Misses         27       31       +4     
  Partials       63       63              
Impacted Files Coverage Δ
src/index.jsx 88.70% <0.00%> (-1.20%) :arrow_down:

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 79a61c3...5b0b16a. Read the comment docs.

codecov[bot] avatar Jun 01 '22 06:06 codecov[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 02:09 stale[bot]