-
Notifications
You must be signed in to change notification settings - Fork 41
Orientation change issue #97
Comments
having the same issue, but only on android mobile phones... |
Hey @ou-di @ischoe thanks for reporting this. I'm going to try to reproduce this in the next few weeks. We rely on the Also, is this with react-native or just on the web browser of android phones? |
This might be related to #96 although it seems like other users are reporting the exact opposite behavior (works on android, not IOS) 🤔 |
@AlecAivazis I think the issue is the matchMedia method. To answer your question, it's on the mobile web browser. |
Hi! I'm having problems with the orientation also, but my problem is that it's staying in "null". This produce that any other attribute isn't being calculated and stays in "infinity", causing wrong behaviours on mobile. This is my browser object on first load (happens only like 40% of the times):
|
Hi, |
Hey @dmansof, @JesusADS - I'm sorry yuo're running into issues with orientation detection. Can you please tell me what browsers you are using? |
Hi @AlecAivazis , i'm using Chrome V67.0.3396.79 |
Hi, I can replicate this issue on chrome 68 using developer tools device mode. I think the issue is the following; "the event [orientationchange] is triggered before the rotation is complete. Therefore, the recorded height reflects the state before the actual orientation change." So this would include the matchMedia() you run in your reducer. So we need to wait a little before firing refreshResponsiveState until the height/width have actually changed. There's a few decent solutions in that stack overflow link. |
…tationchange so that matchMedia will produce expected result.
…er orientationchange so that matchMedia will produce expected result." This reverts commit bf7aa2f.
Orientation change value is always one step back. E.g on portrait mode on load the value ist 'portrait'. On first orientation change (from portrait to landscape) nothing happens (should be landscape). On second orientation change (from landscape to portrait) the value is changed to 'landscape'.
Can someone confirm the issue?
I'm using the current release 4.3.5
The text was updated successfully, but these errors were encountered: