lity icon indicating copy to clipboard operation
lity copied to clipboard

Youtube Video does not open in the Lightbox for Chrome

Open bornResponsive opened this issue 6 years ago • 13 comments

Hi,

Youtube video no longer opens in data-lity and just goes to youtube website. Even the example on your website does the same for Chrome Browser (v65) on macOS.

Do you have a workaround to this problem?

Many thanks.

bornResponsive avatar Apr 19 '18 09:04 bornResponsive

It may be specific to your chrome install. Youtube links are working for me on Chrome 65 OSX

ry4nolson avatar Apr 19 '18 22:04 ry4nolson

I suspect this some other error which just prevents the lity code from running. Do you have a reproducible test case?

jsor avatar Apr 20 '18 05:04 jsor

Hi Jsor,

As mentioned above the issue can be replicated on your own website: https://sorgalla.com/lity/

Here is a video of the issue. As you can see it is fine for Vimeo but Youtube lightbox does not work on macOS for Chrome. I was able to replicate this on 2 different Macs.

https://videos.ctfassets.net/0z9hl3wp2ggj/4sOcfSe7RewCKU6CKIYmYA/262e9fe6ef2a54d1cca1403282909b66/data-lity-bug.mov

Many thanks.

bornResponsive avatar May 04 '18 09:05 bornResponsive

Unfortunately, that doesn't help much. Still same guess as in https://github.com/jsor/lity/issues/168#issuecomment-382986878 :(

jsor avatar May 15 '18 18:05 jsor

I'm experiencing the same behavior as bornResponsive documented when I'm logged into Wordpress in Chrome 67.0.3396.87. I did not experience this behavior until recently, so it's possible a Wordpress core or plugin update is the cause, but the behavior is exactly as bornResponsive shows in his video.

I am not experiencing this behavior with the example on the Lity website.

brownlo avatar Jun 20 '18 19:06 brownlo

I'm having this same issue with a WordPress site. It happens using Chrome on Mac and Edge on Windows all other browsers I've tried work as expected. Are you able to reproduce the problem? URL of an affected page: https://www.faro.com/en-sg/products/construction-bim/faro-laser-scanner-focus/

splitrockUP avatar Jan 02 '19 19:01 splitrockUP

This may be related to YouTube wanting access to the account of the currently logged in Google user. We're seeing the same error in Safari on macOS with a log message: Refused to display 'https://accounts.google.com/ServiceLogin?continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Dfi%26app%3Ddesktop%26next%3D%252Fsignin_passive%26feature%3Dpassive%26action_handle_signin%3Dtrue&hl=fi&service=youtube&passive=true&uilel=3' in a frame because it set 'X-Frame-Options' to 'DENY'.

Kimitri avatar Feb 28 '19 14:02 Kimitri

I don't think this is of much help to anybody, but I had a guy fix the problem. All he told me was "I added a script to prevent redirect when clicking into a element"

splitrockUP avatar Feb 28 '19 22:02 splitrockUP

I'm not sure what's causing this - it's definitely a Chrome issue though. I can't recreate in Safari or Firefox. The workaround I've used though is to use the data-lity-target property to take the YouTube link, and set the link itself to '#'.

martian77 avatar Mar 27 '19 10:03 martian77

What are the browser extensions you have installed? I can't reproduce this on any of the links provided, even in incognito.

ry4nolson avatar Mar 27 '19 14:03 ry4nolson

@martian77 @bornResponsive Do you see any errors in the console when the redirect happens? I think @jsor is probably right. An error is occurring somewhere in the event handler before it has a chance preventDefault().

ry4nolson avatar Mar 27 '19 14:03 ry4nolson

@ry4nolson I see no errors now I've switched to the work around I stated above - and I've done a lot of other work on the site since that change so I'm not sure what else may have affected it.

I could only recreate it in Chrome, and I currently have Version 73.0.3683.86 (Official Build) (64-bit) installed. I'm pretty light on extensions: Google docs offline, Google translate, Instapaper, LastPass and xdebug helper. I'm on a mac, if that makes any difference, on Mojave. It is a wordpress site. Also, extremely weirdly it didn't happen when I installed the site locally initially, and then it started happening, but I can't tell you what I did to cause that because I was trying to fix this for a client so I was looking at a lot of different things!

I've also tested it on Safari and Firefox on the same machine, and I got no issues with either of those.

It may even be a wordpress plugin that's interfering, since wordpress also seems to be a common denominator. It's really hard to say.

martian77 avatar Mar 27 '19 16:03 martian77

I am getting the same issue on Mac. Both Chrome and Safari are giving me the same error.

I get this error: Refused to display 'https://accounts.google.com/ServiceLogin?continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Dfi%26app%3Ddesktop%26next%3D%252Fsignin_passive%26feature%3Dpassive%26action_handle_signin%3Dtrue&hl=fi&service=youtube&passive=true&uilel=3' in a frame because it set 'X-Frame-Options' to 'DENY'."

Chrome: Version 75.0.3770.142 (Official Build) (64-bit) Safari: Version 12.1.1 (14607.2.6.1.1)

Has anyone found a workaroiund the issue?

Archie22is avatar Aug 02 '19 10:08 Archie22is