Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no support for "picture" in IE9 #22

Open
vlrprbttst opened this issue Jul 27, 2013 · 7 comments
Open

no support for "picture" in IE9 #22

vlrprbttst opened this issue Jul 27, 2013 · 7 comments

Comments

@vlrprbttst
Copy link

just noticed that the picture option simply doesnt work in ie9

@dhunink
Copy link

dhunink commented Aug 30, 2013

I do experience the same problem. Swapping picture for figure isn't doing the trick in my case...

I ended up manually changing 'source' to 'pic-source' in query.pucture. Off course you've to do so in the html as wel.
I think it would be a good idea to change the master according to this issue.

@iandevlin
Copy link

Since the picture element doesn't actually exist, IE is probably ignoring it so it would need to be "created" in the same way that all the HTML5 elements are in the popular html5shiv script so that IE knows about it and can then deal with it.

@dhunink
Copy link

dhunink commented Sep 1, 2013

Hi Ian, strange thing is I had html5shiv included (latest release), but IE is still ignoring the picture tag.

@Abban
Copy link
Owner

Abban commented Sep 1, 2013

I think IE will always ignore the picture tag. Now that srcset has been implemented in Webkit I'd say that the rest of the browsers will follow suit. Ugly markup, but at least some progress is finally being made.

@iandevlin
Copy link

The picture element isn't in the html5shiv, I was just pointing out that it needs something similar in order to understand it, e.g. document.createElement("picture");

@benplum
Copy link

benplum commented Mar 7, 2014

I don't think the createElement trick will fix the issue. IE9 is removing source tags that aren't nested inside an audio or video tag before js runs.

@cehter
Copy link

cehter commented May 27, 2014

I had the same Problem, but now it works. I looked how picturefill fixed this problem and they use the following syntax:

 <picture>
      <!--[if IE 9]><video style="display: none;"><![endif]--> 
      <source src="foo.png">
      <source src="@teaser.ImageSource" media="(min-width: 768px)">
      <source src="@teaser.ImageSource" media="(min-width: 996px)">
      <!--[if IE 9]></video><![endif]-->
      <noscript>
          <img src="@teaser.ImageSource" alt=""/>
      </noscript>
</picture> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants