Skip to content

Prevent swiping pages when clicking on video buttons (BL-14021)#333

Merged
hatton merged 1 commit intomasterfrom
noSwipeOnVideoButtons
Oct 25, 2024
Merged

Prevent swiping pages when clicking on video buttons (BL-14021)#333
hatton merged 1 commit intomasterfrom
noSwipeOnVideoButtons

Conversation

@JohnThomson
Copy link
Copy Markdown
Contributor

@JohnThomson JohnThomson commented Oct 24, 2024

This change is Reviewable

Copy link
Copy Markdown
Member

@hatton hatton left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @JohnThomson)


src/bloom-player-core.tsx line 229 at r1 (raw file):

// runs more often.
function handleInputMouseEvent(event: Event) {
    if ((event.target as HTMLElement).closest(".videoControlContainer")) {

Will this prevent swiping on the whole video? I was expecting that we would just be limiting to the buttons on the video. Might seem like a small difference if the video is small, but if it were full page?

Copy link
Copy Markdown
Contributor Author

@JohnThomson JohnThomson left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @hatton)


src/bloom-player-core.tsx line 229 at r1 (raw file):

Previously, hatton (John Hatton) wrote…

Will this prevent swiping on the whole video? I was expecting that we would just be limiting to the buttons on the video. Might seem like a small difference if the video is small, but if it were full page?

No. VideoControlContainer is a class applied to the div that surrounds each of the button SVGs. Swiper behavior is only interfered with on the buttons themselves.

Copy link
Copy Markdown
Member

@hatton hatton left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @JohnThomson)

@hatton hatton merged commit 5cac9c9 into master Oct 25, 2024
@hatton hatton deleted the noSwipeOnVideoButtons branch October 25, 2024 14:18
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants