'Prevent visibility change when ios file picker is opened
I am building a web app with React JS and I came across this annoying issue. Currently on before unload, I am using socket io to emit a disconnect message to the server to go offline, and then I turn off the socket. On visibility change, I am reloading the user's screen to prevent the user from going offline when they minimize the site or pull it back up. However, I have a file picker to select an image, and on ios mobile devices, when the file picker is open, it thinks that the visibility has changed and therefore refreshes the page. This is a problem as now the user cannot select an image. Does anyone have a solution to this? Please get back to me as soon as possible. Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
