I have a map page in my app in which I listen for online and offline Cordova network events. In the case of going offline I want to disable mostly all the UI on the page except one navbar button.
This involved disabling the searchbar, and for this I have two questions:
• How do I force the native keyboard to close as well when I call searchbar.disable()? - if a search had commenced before network was lost, I can disable the searchbar but the keyboard and cursor remain.
• How do I hide and show the searchbar-icon in the correctly intended way?
Thank you, that’s a very elegant solution for handling all the offline display state for the UI and I guess it will just self update the layout through css targeting changes.
On the cordova-plugin-network-information GitHub it says to attach the online / offline event listeners to document, does it make a difference if it’s in window or document? And should I be placing this inside the document deviceready listener?
So how would I force the native keyboard to close, or is that out of the scope of web apps?