Not showing image with media query info using default browser on Android 2.3 Gingerbread #42

Closed
asuh opened this Issue Sep 27, 2012 · 11 comments

Projects

None yet

5 participants

@asuh
asuh commented Sep 27, 2012

This is very specific use case but when I tried a blank HTML document using just the latest picturefill.js elements, I was not able to display the data-src images that contained data-media property. The only way I can make it show up is if I delete the data-media property off the first image in the set. Is this just limited to Android <2.3 and is there a fix for this?

To see an example, take the demo here:http://scottjehl.github.com/picturefill/
Delete the first image that is without the data-media property and then try it on Android 2.3 browsers.

Given that ~60% of Android users are still using 2.3 (and many not ever being upgraded to ICS on these phones), I'm hoping there's a fix for this!

+1

+2
Makes this solution unusable for me.

Owner

The only way I can make it show up is if I delete the data-media property off the first image in the set.

This is actually the recommended approach for picturefill markup. The example in the readme has no data-media attribute on the first data-src element, as it is meant to address the first "mobile-first" media breakpoint, which is to say, no breakpoint at all. Does that help clarify?

I'm on Android 2.3.6, and on demo page http://scottjehl.github.com/picturefill/ no image shows at all for me.

Owner

oh. okay I understand now, sorry. Yep, that's one that needs fixing!

asuh commented Apr 19, 2013

Odd, I just tried loading http://scottjehl.github.io/picturefill/ on Android 2.3.5 browser and it shows me the default image.

This ticket was originally opened as a problem trying to get Picturefill to work for Android 2.3.x as well as IE8 amongst everything else. I can't remember the original reason I needed to have the default "mobile-first" image appear with a data-media attribute so I forgot the exact context but I do remember having a problem that I had to hack it for IE8 in order for it to work again with Android 2.3.x.

I was able to solve everything doing some hacky work you can see here: http://aarp.org/savesmemoney

What browser did you use? I can see it on Opera, but not on the default browser on 2.3.6.

asuh commented Apr 19, 2013

I tried it on both Browser and Dolphin Browser in Android 2.3.5. Same result. Didn't try it on Opera.

Well can't explain why it's not working for me on the default but is on Opera, so until I can I can't rely on this unfortunately.

asuh commented Apr 19, 2013

Try downloading Dolphin and see what happens. It uses the same rendering engine as Browser so it should be consistent. If it's not consistent, that's another problem.

Collaborator
Wilto commented Apr 17, 2014

Hopefully not an issue as of the 2.0.0 alpha—we’ve got a bunch of tests in place for conditions like this, now. Feel free to reopen if any of you are seeing the same issue.

@Wilto Wilto closed this Apr 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment