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(PlayPauseButton): conflict with spacebar in fullscreen video #2383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ferferga
Copy link
Member

No description provided.

@jellyfin-bot
Copy link

jellyfin-bot commented Jun 22, 2024

Cloudflare Pages deployment

Latest commit 2033910
Status ✅ Deployed!
Preview URL https://bf0046f1.jf-vue.pages.dev
Type 🔀 Preview

View build logs
View bot logs

Copy link

sonarcloud bot commented Jun 22, 2024

@@ -3,14 +3,21 @@
icon
:size="size"
:loading="playbackManager.isBuffering"
@click="playbackManager.playPause">
@click="(e: MouseEvent) => {
if ('pointerType' in e && e.pointerType) {

Choose a reason for hiding this comment

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

e.keyCode != 32 might be a better fix - this solution breaks touch input on the button (I wouldn’t have noticed but happened to be testing via an iPad!).

More on this situation which I am only just learning about: http://www.quirksmode.org/dom/events/click.html

Copy link
Member Author

Choose a reason for hiding this comment

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

I also ran the tests in Microsoft Edge on a Surface, where that property's value was "touch". So I assume in Chromium that property changes between "mouse", "touch" and "" when it's not pointer based, but in Safari that property doesn't exist whatsoever? Funky differences between browsers strikes again

I don't recall seeing keyCode in the payload of that event (in Chromium) either, but I need to check again. If it doesn't exist, I think that the only cross browser solution would be to focus the button as I mentioned in the issue.

But we can't do that now because the underlying ref is not exposed by Vuetify (and using querySelector is not a good solution). Would you like contributing in creating a JBtn component that has the same implementation as Vuetify but in SFC?

Copy link
Member Author

Choose a reason for hiding this comment

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

@manicExpressive I can confirm you now that keyCode doesn't exist in Chromium-based browsers.

Choose a reason for hiding this comment

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

Got it, I think I'm tracking with you now that I've poked around on my (Ubuntu / Chrome / Firefox) desktop a bit.

I don't have capacity in the near term to contribute much, but I'll circle back and check-in when my schedule opens up a bit.

@ferferga ferferga force-pushed the master branch 4 times, most recently from fe041a3 to 3fbf550 Compare October 3, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants