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

Remove href from button to prevent possible navigation #124

Merged
merged 1 commit into from
Sep 11, 2022

Conversation

delucis
Copy link
Contributor

@delucis delucis commented Apr 11, 2022

Closes #123

Better support for the progressive enhancement approach of making the play button a link before the custom element loads. Currently with that approach, clicking the play button will navigate to YouTube even after the custom element has loaded. This PR removes the link’s href in the connectedCallback to stop that from happening.

Closes paulirish#123

Better support for the progressive enhancement approach of making the play button a link before the custom element loads.
FANMixco added a commit to SupernovaIC/lite-youtube-embed that referenced this pull request Aug 8, 2022
I combined two pull requests:
- paulirish#124
- paulirish#122
- Added also support to WebP.
Copy link
Owner

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

Thanks. I love it.

@paulirish paulirish changed the title Remove href from play button when element loads Remove href from button to prevent possible navigation Sep 11, 2022
@paulirish paulirish merged commit 96cc2f1 into paulirish:master Sep 11, 2022
@delucis delucis deleted the delucis/fix-123 branch September 11, 2022 14:39
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.

Play button bug when using progressive enhancement pattern
3 participants