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

Check event.type in duplicate event bailout #5472

Merged
merged 2 commits into from Dec 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/input/keyboard/KeyboardPlugin.js
Expand Up @@ -747,14 +747,15 @@ var KeyboardPlugin = new Class({
}

// Duplicate event bailout
if (code === this.prevCode && event.timeStamp === this.prevTime)
if (code === this.prevCode && event.timeStamp === this.prevTime && event.type === this.prevType)
{
// On some systems, the exact same event will fire multiple times. This prevents it.
continue;
}

this.prevCode = code;
this.prevTime = event.timeStamp;
this.prevType = event.type;
cjw6k marked this conversation as resolved.
Show resolved Hide resolved

if (event.type === 'keydown')
{
Expand Down