Closed Bug 1518794 Opened 5 years ago Closed 5 years ago

picture srcset not working when tag was dynamically loaded

Categories

(Core :: DOM: Core & HTML, defect)

64 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1518795

People

(Reporter: rechdshraipfelehr, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

Open a page containing a <picture>-tag using srcset, like the example from developer.mozilla.org: https://interactive-examples.mdn.mozilla.net/pages/tabbed/picture.html
It also happens in my Angular project which dynamically loads the page content.
It does not happen on static websites without JavaScript like this: http://jsfiddle.net/6od2qm5a/

Actual results:

The picture meant to be for a browsers wider than 800px is always displayed.

Expected results:

The image should switch when the browser is smaller than 800px.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Component: Untriaged → DOM
Product: Firefox → Core
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.