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

Don't send duplicate event on mouse click #143

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

throwaway96
Copy link
Member

Apparently, the YouTube app generates key events with keyCode 13 (i.e., the "OK" button on webOS) when receives a click event.

Usually, we do the reverse; that is, we cause a click on the element with focus when a keydown with keyCode 13 is received. When such events are generated by the YouTube app, this leads to duplicate and incorrectly targeted click events.

The isTrusted property seems to provide a way to distinguish between events created by YouTube and WAM itself.

Fixes #139.

@throwaway96 throwaway96 added the bug Something isn't working label Mar 29, 2024
@throwaway96 throwaway96 marked this pull request as ready for review March 29, 2024 03:16
On clicks, the YouTube app generates key events with keyCode 13 ("OK
button). We should not be sending our own click events for these, as
they already exist.
@throwaway96 throwaway96 merged commit 0537775 into webosbrew:main Mar 30, 2024
1 check passed
throwaway96 added a commit that referenced this pull request Mar 30, 2024
fire332 pushed a commit to fire332/youtube-webos that referenced this pull request Mar 31, 2024
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 this pull request may close these issues.

Bug: Multiple options changed when clicking with a mouse
1 participant