Skip to content

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

Open
@landerson-gc

Description

@landerson-gc

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions