picture <source> element doesn't select the right source when in Angular app
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: rechdshraipfelehr, Assigned: emilio)
Details
Attachments
(2 files)
I've created an empty, new Angular app with the example of the <picture>-Tag from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
The content of app.component.html is
<picture>
<source srcset="https://interactive-examples.mdn.mozilla.net/media/examples/surfer-240-200.jpg"
media="(min-width: 800px)">
<img src="https://interactive-examples.mdn.mozilla.net/media/examples/painted-hand-298-332.jpg" />
</picture>
The image should change when the browser is smaller than 800px but it doesn't in Firefox 65 while it works in other browsers.
Live example: https://angular-bxhc7x.stackblitz.io/
Live example source code: https://stackblitz.com/edit/angular-bxhc7x
It's very similar to bug 1518795 so I guess it has to do with shadow dom.
Comment 1•6 years ago
|
||
Let's see if Emilio has thoughts here. :)
| Assignee | ||
Comment 2•6 years ago
|
||
This is not using Shadow DOM, nor seems a regression (it's broken in 60 as well at least). Also, we get the image wrong even if we load the page with a small viewport to begin with.
I can take a look though.
| Assignee | ||
Comment 3•6 years ago
|
||
I don't see a reason for it not to select the right source.
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
Thanks for the report! The patch above should fix it :)
Comment 8•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•