redux-responsive icon indicating copy to clipboard operation
redux-responsive copied to clipboard

It is not working on IOS devices

Open dpcrespo opened this issue 7 years ago • 11 comments

We've found that the behaviour in our IOS devices is not right. Is this happening of any of you?

it works for Android devices and browsers so we are assuming that we have done the configuration right.

Any clue?

Thanks in advance.

dpcrespo avatar Nov 20 '17 08:11 dpcrespo

Hey @dpcrespo sorry for taking so long to reply to you. Unfortunately, I do not do much responsive native development so I haven't tried redux-responsive on IOS. However, it seems someone else has experienced it so I'm leaving this open as a reminder for me to look into this next time I do. If you want some guidance for tracking this down yourself, I'd love to help any way I can.

AlecAivazis avatar Dec 29 '17 04:12 AlecAivazis

@AlecAivazis this issue should be closed: It is a problem that only occurs in a few (old) browsers and it can be fixed with Modernizr (for example).

linuxonrails avatar Apr 26 '18 16:04 linuxonrails

Thanks for digging into this @linuxonrails - do you think the problem is the same on #97?

AlecAivazis avatar May 03 '18 04:05 AlecAivazis

I just experienced an issue on an iPhone 6s where the responsive state isn't right. If you look at the text underneath "Bongs on Trend", it says that the current media type is "lg", but I have that media type set to the width of 1024px. Any clue why this is happening only on this device? Browsers on desktop works fine... @AlecAivazis

image from ios 1

ianseverance avatar Jul 07 '18 20:07 ianseverance

hey @ianseverance - thanks for reporting this. Do you see anything in your browser console when you visit the site on your phone? It seems strange that this line would execute but things not work

AlecAivazis avatar Jul 07 '18 23:07 AlecAivazis

@AlecAivazis I don't see anything strange. There are no errors in the console. I have tried on both my iPhone 6s (Safari), iPhone 7 Plus (Safari) and Google Pixel (Chrome). It is obviously working because browser.mediaType isn't returning null, it is returning one of the breakpoints. But for some reason, even with orientation change, the browser.mediaType is still returning my lg breakpoint, which is only windows sized 1024px to 1280px.

I also noticed that the compatibility for MediaQueryList is unknown for a lot of different platforms (more specifically mobile devices) which may mean that the issue isn't on your side, but on browser support...

ianseverance avatar Jul 08 '18 02:07 ianseverance

@AlecAivazis Found the issue to my problem. It had to deal with not adding the <meta name="viewport"> tag to my HTML page. So I added this bit of code to make sure mobile is responsive: <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0">. Now, redux-responsive works correctly! I'd maybe add this to the readme in case someone else runs into a problem like this.

ianseverance avatar Jul 08 '18 17:07 ianseverance

Ah! Nice catch! I'm going to be away for a few days, would you mind submitting a PR that adds that? Also, could you check if that also fixes the orientation change detection problems that have been reported?

AlecAivazis avatar Jul 08 '18 20:07 AlecAivazis

@AlecAivazis I submitted a pull request https://github.com/AlecAivazis/redux-responsive/pull/105. I tested it and it seems that any of the orientation problems that people have been experiencing I couldn't reproduce on my machine, but I'm not entirely sure that it is fixed so I left it out of my pull request. It would be worth mentioning in other issues this fix, and seeing if it helps them!

ianseverance avatar Jul 09 '18 01:07 ianseverance

Thanks for doing that @ianseverance!

@dpcrespo, can you verify if what @ianseverance added fixes your problem?

AlecAivazis avatar Jul 12 '18 20:07 AlecAivazis

Let me get some time, and I'll give another try. Anyway when I met the issue I checked the viewport out and it was there already. As I said let me get some time and I'll back to you. Thanks for being worried about this.

dpcrespo avatar Jul 13 '18 09:07 dpcrespo