Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MainUI] Closing Location/Equipment/Properties does load a wrong page in Milestone 4.1.0.M4 #2196

Closed
michaeljoos72 opened this issue Dec 4, 2023 · 5 comments · Fixed by #2221
Labels
bug Something isn't working main ui Main UI

Comments

@michaeljoos72
Copy link

michaeljoos72 commented Dec 4, 2023

Best is to share a recorded video: https://drive.google.com/file/d/1p1DLw-PepDrYO34Kv9jeFX-wSX94riyO/view?usp=sharing

This only happens in 4.1.x Milestones (I have seen in 4.1.0.M3 and 4.1.0.M4). No issues in openHAB 4.0.4.
It always jumps back to the previous page that was loaded. Same in Location, Equipment or Properties-Tab.

Tested in Chrome and Edge with same result.

@michaeljoos72 michaeljoos72 added bug Something isn't working main ui Main UI labels Dec 4, 2023
@kristofejro
Copy link

I can confirm it happens also on my openHAB 4.1.0.M4.

@lolodomo
Copy link
Contributor

lolodomo commented Dec 9, 2023

This bug is very annoying.
@florian-h05 @kaikreuzer : I can't imagine we can release 4.1 with such a bug.

florian-h05 added a commit to florian-h05/openhab-webui that referenced this issue Dec 10, 2023
Fixes openhab#2196.
Reverts openhab#2074.

I have tried messing around with the browser history manually to fix that issue, however trying several approaches, none worked perfect.
This is the best solution I could come up with, it at least remembers which tab you had opened when you navigate back to the home page from any other page.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor

@lolodomo: I have created a PR to fix that.

@ghys
Copy link
Member

ghys commented Dec 11, 2023

Yes in fact there's a bug that occasionally occurred even before (I think many have experienced a "double-back" when going back), this is likely a bug in Framework7's router actually.
I think it is related and makes the router issue even more prominent.
#2211 will likely alleviate the problem but not solve the actual root cause, which I really want to solve "one day".

@florian-h05
Copy link
Contributor

Probably the bug in f7router has already been fixed, but our deps are really outdated ... luckily #2151 may help with that.

florian-h05 pushed a commit that referenced this issue Dec 15, 2023
Fixes #2196.
Replaces #2211.

The double back navigation was caused by:

https://github.com/framework7io/framework7/blob/31f4c7065e8abe9b8b27f354de4e390a8cd584c0/src/core/utils/history.js#L56-L61

and `router.updateCurrentUrl()`, unlike the name implies, doesn't update
`router.url` for some reason (maybe a bug?).

-----

Signed-off-by: Yannick Schaus <github@schaus.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
5 participants