Skip to content

Mark handled keydown events as handled#844

Merged
gpbl merged 2 commits intogpbl:masterfrom
johnjesse:CancelHandledKeydownEvents
Feb 21, 2019
Merged

Mark handled keydown events as handled#844
gpbl merged 2 commits intogpbl:masterfrom
johnjesse:CancelHandledKeydownEvents

Conversation

@johnjesse
Copy link
Contributor

The Arrow keys are used by the browser to scroll, and DayPicker uses them to navigate months and years on the body of the DayPicker. Currently these events are not marked as handled so the browser does it's default action - which is scrolling when in a container that scrolls, and they bubble to anyone else listening higher up the tree. I've used the cancel event helper to stop that happening.

Here is a sandbox that highlights the issue https://codesandbox.io/s/1q60jqr9ml

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #844 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #844   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         645    649    +4     
  Branches      141    141           
=====================================
+ Hits          645    649    +4
Impacted Files Coverage Δ
src/DayPicker.js 100% <100%> (ø) ⬆️

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 39ad48e...e0c3034. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #844 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #844   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         645    649    +4     
  Branches      141    141           
=====================================
+ Hits          645    649    +4
Impacted Files Coverage Δ
src/DayPicker.js 100% <100%> (ø) ⬆️

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 39ad48e...e0c3034. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #844 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #844   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         653    657    +4     
  Branches      145    145           
=====================================
+ Hits          653    657    +4
Impacted Files Coverage Δ
src/DayPicker.js 100% <100%> (ø) ⬆️

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 072e305...cc46260. Read the comment docs.

@gpbl
Copy link
Owner

gpbl commented Feb 21, 2019

Hey thank you – sorry for the late merge.

@gpbl gpbl merged commit b8c2f18 into gpbl:master Feb 21, 2019
@gpbl gpbl added the v:patch label Feb 21, 2019
kimamula pushed a commit to kimamula/react-day-picker that referenced this pull request Aug 17, 2022
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.

3 participants