@ysc, is this a known thing that can somehow be worked around? I am building an android app with a flag to toggle kiosk mode and I can not get this to work.
Edit: this happens after upgrading HABPanel to the current snapshot from today.
@vbier for context, the kiosk mode was meant to be activated upon direct navigation only so a “kiosk-mode” dashboard has its own canonical URL you can set as your browser’s home page, not something that would be enabled later or from the main menu. So it could be a “bug” or “design limitation” depending on how you consider it
Maybe you could rework the settings in HABPanelViewer so that the user has to specify the name (id) of a dashboard to display in kiosk mode, the way it was intended?
Then you simply would need to point the browser to:
Ah I see, I think what’s happening was, if you navigate from one url to another with the same part before the ‘#’ (only the “fragment”, after the ‘#’ changes) the browser won’t perform a page refresh, and the stuff executed on page load doesn’t get executed again.
Even if I found a workaround for me, this might still be a problem for others, as this also happens when you have the URL in the browser and just add/remove the kiosk flag. When you have the time and this is not too hard to fix it might be worth to look into this.
There is another problem with kiosk mode. If I go to the main habpanel page with kiosk mode enabled, then click on one of the panels, and then reload the page, kiosk mode is turned off.
@ysc, should I write an issue for this or is there some known workaround?
Err, normally you’re not supposed to be able to switch between dashboards or go to the menu when in kiosk mode since it’s designed to display a specific dashboard and disable all navigation
Oh, come on. That’s essentially what you wrote last time. I had the hope maybe you forgot and tell me that there is a way to use kiosk mode like I thought it could be used: I have a dashboard with navigation buttons on it and only use kiosk mode in order to hide the title bar to get more screen real estate.
This works flawlessly until I hit the reload button.
Then I take it as a compliment for sticking to my guns
You’re right though about the navigation buttons, I forgot about those. The only way to enable kiosk mode is to append ?kiosk=on to the URL, which works with reloads as long as the URL doesn’t change, but that suffix is gone when you navigate. But that’s kind of expected and I’m not sure it’s really a bug
What you could perhaps do as a workaround is handle the case specifically with HABPanelViewer since you have a menu entry to perform the reload: (pseudo-code, not actual working code)
The problem is that the url does no longer contain the kiosk part after pressing a navigation button.
I have removed the kiosk mode setting from my app in order to let users also use it on other UIs, which means I do no longer know if kiosk mode had been activated. Or even if the currently shown page is a habpanel page.