question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React-select on safari mobile does not work

See original GitHub issue

Hi guys, I forked the project and made a branch to illustrate this problem.

https://github.com/martinratinaud/react-starter-kit/tree/fix/react-select

Launch npm start and go to http://localhost:3000 from a mobile (not the chrome simulator but a real device or the iOS Simulator)

When you try to select Two, nothing happens even though it works well on a desktop browser.

In the meantime, the official page of react-select deos work on safari mobile http://jedwatson.github.io/react-select/

I tested by disabling SSR but it does not work either.

I think the problem comes from the webpack config but I could not figure this out.

If somebody could help me on this, that would be awesome.

PS: I experienced the same with react-dropzone but hopefully fixing this will fix it too

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
phpeekcommented, Mar 27, 2017

@martinratinaud What happens if You use port 3001 instead of 3000 ?

BrowseSync is working for You only if You use port 3001. JS assets are not being loaded on port 3000 (due to BrowserSync proxying) unless You build app for release - npm run build -- --release and start server - node build/server.js.

Also it appears that react-select is setting element’s id attributes automatically which is why I can see this error when running code from Your repo:

Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) r" id="react-select-2--value" data-react
 (server) r" id="react-select-7--value" data-react

This is not well suited for isomorphic apps. react-select should pick up its own code rendered on server rather than generate new ids again on client.

0reactions
martinratinaudcommented, Mar 29, 2017

Thanks a lot @Jaikant it works well if I replace fastclick with react-fastclick. I submitted a PR for this: https://github.com/kriasoft/react-starter-kit/pull/1198.

Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select in IOS doesn't work · Issue #2891 · JedWatson/react ...
Hello, I am using the last verions of react-select (2.4.2) and I solved this problem by removing the <button> in every option of...
Read more >
React-select not working on mobile browsers - Stack Overflow
The component below works on mobile and desktop browsers const SelectInput = (props) => { const className = `field required ...
Read more >
react-select/CHANGELOG.md - UNPKG
- [#3432](https://github.com/JedWatson/react-select/pull/3432) Fix bug with select menu's not working on mobile.
Read more >
Accessibility - React
These are toolboxes filled with HTML attributes that are fully supported in JSX and enable us to construct fully accessible, highly functional React...
Read more >
user-select - CSS: Cascading Style Sheets - MDN Web Docs
Note: -webkit-user-select: all; doesn't work in Safari; use only "none" or "text", or else it will allow typing in the <html> container.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found