-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Firefox for Android does not load portrait-version of image #524
Comments
Does this help: |
Unfortunately no. I copied the code verbatim and put it under |
Note that the most critical point here is not about reacting to orientation changes, but FF for Android not loading the square (portrait media query) image at all. |
No wait, it actually works. It runs on orientation changes. I would like to have it do an initial run though, to show the portrait version without having to rotate the device to landscape and back. How is this best done? Use JQuery to trigger the orientation change event after the code snippet you linked to? |
No triggering with jQuery won't work. jQuery has decided to not follow standards. Could you please re-check your problem with Firefox for Aurora for Android. In case this bug still happens, please report this (you can also comment here). I will work on a solution for this. |
In Aurora even the jQuery orientation change workaround doesn't work (landscape image is used both initially and after orientation changes). FF Beta (on Google Play) works like the current stable version: Initially landscape is shown, but the orientation change workaround works. In the bug you linked to, I see it is marked as fixed in firefox41. The Aurora I downloaded was 40. |
I notice that adding Note that I have not updated the public site with this new line of code. Anyhow, this seems to be something picturefill should take care of, given what picturefill is and tries to do. Am I right? |
I have discovered that the correct image is loaded if I place It does not fix the problem in Aurora, though I'm not overly concerned about that. |
@cmeeren |
Great, looking forward to the fix! |
Oh, and I've discovered that the ordering fix does not always work. Most of the time, but every now and then there is a page load where it doesn't work. |
I tried to write a workaround for this. Please try the following script: I would like to have positive or negative feedback. |
Thank you! Seems to work. I included your script last, and now the correct version is shown both initially and after after reorientation, no matter what the order of the However, for a brief moment while the page loads, the horizontal version shows even when the phone is in portrait orientation. The only way for me to avoid this is to change the I find that weird. I could understand if FF loads the |
Great! When will PF3 be released? |
We will release an alpha version soon. You should use it. |
Thanks. Will it be stable enough for production use? Mind dropping a comment here when it's released? |
Take a look at this page. In portrait orientation, the slider should be square, with square images. Otherwise it's horizontal. This works when resizing desktop browsers, as well as on stock Android browser. However, in Firefox for Android, the images are horizontal (the slider itself is square, so the CSS media query is correctly interpreted.)
Is this a known bug? Can it be worked around somehow, to make it actually work?
The text was updated successfully, but these errors were encountered: