Skip to content

Is it possible to completely disable internal focus handling? #2332

Answered by gpbl
augustl asked this question in Support
Discussion options

You must be logged in to vote

where the cells in the grid are focused, and when a cell lose focus in the DOM, editing stops.

I'm not sure if I understand your requirement :) Are you trying to keep a grid cell focused, while allowing the user to pick a day?

If so, I'd leave the focus go where the browser wants (or DayPicker decides). Try to see if the onSelect handler can help you to move the focus to the initial cell after a day is picked up.

<DayPicker onSelect={ () => putFocusBack() } />

Otherwise, try to identify in the DayPicker code where exactly the focus is lost: day buttons in DayPicker are focusable and the browser - not DayPicker - may change the focus too.

If it is the handleDayClick handler, then you can…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@augustl
Comment options

@gpbl
Comment options

@augustl
Comment options

Answer selected by augustl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants