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

[Bug] Unable to trigger focus on input multiple times. #639

Open
landerson-gc opened this issue Aug 30, 2021 · 0 comments
Open

[Bug] Unable to trigger focus on input multiple times. #639

landerson-gc opened this issue Aug 30, 2021 · 0 comments

Comments

@landerson-gc
Copy link

Vue2-datepicker version: 3.10.1
Vue version: 2.6.14
vue-test-utils: 1.1.4
Browser: jest / jsdom

More of an FYI than a bug when using Vue-Test-Utils to simulate interaction in jest.

After the changes to how trigger('focus') works in vue-test-utils >= 1.1.4:

  • `wrapper.find('input').trigger('focus') would only open the popup the first time it was called
  • Any additional calls would not open the popup

Workaround:

  • it was necessary to call wrapper.find('input').element.blur() after the datetime or time panel popups are closed to have `trigger('focus') open the popup again.

See: vuejs/vue-test-utils#1777 (comment)

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

No branches or pull requests

1 participant