Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome disables buttons and input elements when offline

I am working on a progressive web app and it has a file input button to choose a file from the device storage. It works fine offline on chrome desktop version but the android version disables the button. I have no idea how to fix this. There are no css in the project for now just the html and the javascript code for the service worker.

like image 520
Bupathi Sangeeth Avatar asked Apr 19 '18 09:04

Bupathi Sangeeth


People also ask

Do Chrome extensions work offline?

Chromebook user or not, as long as you're a Chrome user, you can install offline extensions (and apps) for common tasks like note taking and editing PDFs. We'll show you some of those extensions today, right after we introduce you to the most important extension of all: My Cats New Tab.

How do I stop Chrome from loading offline pages?

You can try disabling it in the chrome://flags/ config by searching for offline and disabling those. I think I figured it out! This was annoying the beejebus out of me. I have a Pixel 3a running latest version of Android, FYI.


2 Answers

I figured out what was going on with my own page -- somehow every time I hit the app in the home screen, it would go to the saved offline page from Chrome instead of trying to actually use my PWA, and those saved offline pages have their inputs disabled.

I had to go delete the saved web page from Chrome to get mine to work again.

I only noticed because I changed some text around and nothing was correctly updated.

like image 116
kakigoori Avatar answered Oct 13 '22 12:10

kakigoori


Your seems code is ok. So it might be the set up of the sys.

check the google tutorial https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/?hl=en#download_the_code

like image 32
srttowers Avatar answered Oct 13 '22 14:10

srttowers