Pop-up card option to remove hash from URL after opening #1029
Replies: 2 comments 3 replies
-
Hi! In the HA app settings, there is a toggle to change to make sure that your dashboard don't go to the previous URL when reopened. This should do the trick for you, because I can't remove the hash directly without messing with the browser history. |
Beta Was this translation helpful? Give feedback.
-
I know this was marked as closed earlier but I sent my reply early in the morning before I got the chance to check it out, it seems like the setting to not remember the previous page isn't a perfect solution. It only prevents the issue when the app restarts completely. Why can't the hash be removed immediately with replaceState() exactly? It seems the main issue is that if you use back in the browser to close the popup, you can't go forward back to the popup, is this functionality really necessary? If you close the popup through some other method, the hash is removed with replaceState() which removes the popup url from the tab history, then you can no longer access the popup using the tab history either. If you remove the hash with replaceState(), you can still go back to close it, the only issue is that you can't go back forward to the popup. Thank you for all your work, this is an amazing project and a great resource in the Home Assistant ecosystem. |
Beta Was this translation helpful? Give feedback.
-
Hi, it would be nice if we could have an option to remove the pop-up hash from the URL immediately after the pop-up opens instead of keeping it in the url until the pop-up is closed.
I'm currently running into an issue mainly on the companion apps where if the popup is left open, I close the app then return, the app forces a page refresh and the pop-up automatically opens again instead of going to the dashboard.
This by itself isn't much of an issue, I can just close it, the issue is that it retriggers the pop-up open action which in certain cases may not be a desired behavior.
As an example, one of my popups is a TV remote which automatically turns on the TV when opened in case it is off. It's annoying having it turn the TV on as soon as I reopen the app, if I left the popup open the last time I closed the app
popup.card.refresh.issue.mp4
The video above shows the issue in action, the TV is automatically turned on when the pop-up opens so you don't have to press the power button to turn it on, this is good since I as the user manually triggered the pop-up to open, the issue is that if I don't close the popup then go to another app, on return the page is refreshed, which leads to the pop-up re-opening which triggers the TV to turn on again if it was previously off. In this specific case I'd love to be able to specify that the TV Remote pop-up should not save the hash in the url while open, so that if a page refresh occurs, it goes back to the dashboard and not the popup.
Beta Was this translation helpful? Give feedback.
All reactions