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

Calendar flickers on click to focus, when show-calendar-on-focus is enabled #77

Closed
TomKeyte opened this issue Jan 20, 2021 · 3 comments · Fixed by #82
Closed

Calendar flickers on click to focus, when show-calendar-on-focus is enabled #77

TomKeyte opened this issue Jan 20, 2021 · 3 comments · Fixed by #82
Labels
bug Something isn't working

Comments

@TomKeyte
Copy link

When a date is selected, the input does not lose focus. This means to re-open the datepicker via a click in the input, a user has to click outside (blur) the input, and then click inside again. If the input was blurred when a date is selected, this would not happen

@MrWook
Copy link
Collaborator

MrWook commented Jan 20, 2021

Can you provide me with a reproduction sandbox or specify your setup (how do you call the datepicker, which props are you using etc.)?
Because I can't reproduce this issue on the demo site https://sumcumo.github.io/vue-datepicker/demo/#default

@TomKeyte TomKeyte changed the title Input doesn't lose focus when a date is selected Calendar flickers on click to focus, when show-calendar-on-focus is enabled Jan 22, 2021
@TomKeyte
Copy link
Author

TomKeyte commented Jan 22, 2021

Hi @MrWook. I've updated the issue because what I stated wasn't the problem, but a symptom of a pseudo-fix.

The actual problem I was having, was that with show-calendar-on-focus enabled, when you click to open the datepicker, the calendar first opens due to the showCalendarByFocus method, but then immediately flickers closed due to a subsequent call to showCalendarByClick, which toggles the calendar. A second click opens the calendar as normal, as the focus event is not re-fired

You can re-produce with the example by adding show-calendar-on-focus to the default example.

vue-datepicker

@MrWook MrWook added the bug Something isn't working label Jan 22, 2021
@MrWook
Copy link
Collaborator

MrWook commented Jan 22, 2021

Thank you for the report i will look into it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants