Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiDatePicker] Clicking time values, makes scrollbar jump if current time is late #1596

Closed
formgeist opened this issue Feb 26, 2019 · 3 comments
Assignees
Labels

Comments

@formgeist
Copy link
Contributor

When selecting a time value, the container scroll jumps. It makes it very difficult to see what was actually selected. Also notice the extra bug: the first time I clicked on a time value (08:00AM), nothing was selected, but it still jumped. Second time I clicked 08.30AM which worked, but still jumped. Third time I clicked 08.00AM which also worked and jumped.

image1

@formgeist formgeist added the bug label Feb 26, 2019
@cchaos
Copy link
Contributor

cchaos commented Feb 26, 2019

So this is actually "bug" in react-datepicker. I say "bug" in quotes because it is as they designed.

What is happening is that no matter what you click in the time selection, they keep :focus on the user's current time (shown by the slightly highlighted box around 11:30 PM in your example. Browsers always keep the focused items in the scroll view so that's why the scrolled area jumps.

The reason it's not noticeable on the normal datepickers is because the popover always closes after selecting the time.

I'm going to update the title of this one to be more date picker generalized. But I do think it's something we should probably fix in our fork of the react-datepicker.

cc @snide @chandlerprall ^^

@cchaos cchaos changed the title [EuiSuperDatePicker] Clicking time values, makes scrollbar jump [EuiDatePicker] Clicking time values, makes scrollbar jump if current time is late Feb 26, 2019
@snide
Copy link
Contributor

snide commented Mar 7, 2019

@chandlerprall or @thompsongl Either of you think you could look into this one in the next couple days? Think we just need to tweak the way we do focus in these (I realize that may not be easy). We've had enough consistent complaints here it's something we might want to fix before RC1.

@chandlerprall
Copy link
Contributor

I'll take it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants