cancel
Showing results for 
Search instead for 
Did you mean: 

Video in tab on product page

Video in tab on product page

Heya!

 

Using M2.4.1

 

I'm trying to show a Youtube-video in a separate tab on the product page. I have used the exact same approach as I did on 2.3.2, where it works perfectly, but on 2.4.1, the video only displays correctly if the tab has the lowest sort number and is active when the page is loaded. If the tab is not active, the video will look like this:

 

https://prnt.sc/wjqafz

 

after clicking on the tab.

 

It seems that the tab is not rendered when it's not active, so the html2gallery is not able to calculate the available width and therefore sets the video to 100px width.

 

If I remove data-responsive="true" from the div in video.phtml, it displays in the specified size, but of course is not responsive, so that doesn't really work either.

 

Anyone come across this? Has the way Magento renders the page changed, or is it something I'm missing?