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

fix: use the keyCodes provided in options from wrapper.trigger #1378

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

JessicaSachs
Copy link
Collaborator

@JessicaSachs JessicaSachs commented Dec 18, 2019

This will address #1285 and #1295 once merged.

Previously wrapper.trigger('keydown', { keyCode: 65 }) would trigger a keydown event with a keyCode of 0. This is incorrect.

To fix this, we must listen to the keyCode if the modifier doesn't exist.

@JessicaSachs JessicaSachs force-pushed the fix/issue-1285-custom-keycodes-failing branch from 96b0b67 to 6030bd7 Compare December 18, 2019 07:01
@JessicaSachs JessicaSachs force-pushed the fix/issue-1285-custom-keycodes-failing branch from 6030bd7 to bbf1c1e Compare December 18, 2019 07:09
Previously wrapper.trigger('keydown', { keyCode: 65 }) would trigger a keydown event with a keyCode
of 0. This commit fixes that bug.

PR closes #1285
PR closes #1295
@JessicaSachs JessicaSachs force-pushed the fix/issue-1285-custom-keycodes-failing branch from ef3e7d8 to 9aa178c Compare December 19, 2019 01:43
@JessicaSachs JessicaSachs changed the title (fix) use custom keyCodes or codes when provided to trigger options fix: use the keyCodes provided in options from wrapper.trigger Dec 19, 2019
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked over the previous comments that have been addressed, this all seems reasonable - will give it a quick test tonight (and try find edge cases) but code looks ok. Nice job!!

@dobromir-hristov dobromir-hristov merged commit 6fdc179 into dev Dec 20, 2019
@vue-bot
Copy link

vue-bot commented Dec 20, 2019

Hey @JessicaSachs, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

@dobromir-hristov dobromir-hristov deleted the fix/issue-1285-custom-keycodes-failing branch January 15, 2020 08:35
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

Successfully merging this pull request may close these issues.

None yet

5 participants