Describe the issue
In a long page, with the embed player out of the main view, the parent page will autoscroll to the video when iframe is loaded
To Reproduce
Steps to reproduce the issue:
- Create a long HTML page
body: { height: 5000px; }
- Place an embed player iframe in it, out of view :
<iframe style="position: absolute; top: 4000px" ... />
- Open page and reload page
- See error : parent page will autoscroll to center iframe in view
Expected behavior
Parent page should not be controlled by iframe
Environment:
- OS: mac OS
- Browser : chrome
Additional context
Line of code possibly responsible for this behavior :
|
videoElement.scrollIntoView({ |
|
behavior: 'smooth', |
|
block: 'center', |
|
inline: 'nearest' |
|
}); |
Related issue from W3C : w3c/csswg-drafts#7134
A query param to control this behavior would be a nicetohave, if it's a wanted feature.
Describe the issue
In a long page, with the embed player out of the main view, the parent page will autoscroll to the video when iframe is loaded
To Reproduce
Steps to reproduce the issue:
body: { height: 5000px; }<iframe style="position: absolute; top: 4000px" ... />Expected behavior
Parent page should not be controlled by iframe
Environment:
Additional context
Line of code possibly responsible for this behavior :
mediacms/frontend/src/static/js/components/VideoJS/VideoJSEmbed.jsx
Lines 179 to 183 in 8725713
Related issue from W3C : w3c/csswg-drafts#7134
A query param to control this behavior would be a nicetohave, if it's a wanted feature.