@Chardonneaur opened this Issue on May 22nd 2022

When we access to the API page within Matomo, Admin --> Platform --> API. If you click on one of the API method link, it makes you move to the associated link. But then, if you scroll up or click on any other link on the page it will still go back to the anchor link you selected.
Honestly, this is super annoying.

@peterhashair commented on May 23rd 2022 Contributor

@Chardonneaur try to reproduce it, but it works fine for me, I tested Safari, Firefox, and Chrome. Do you mind providing more details, like a screencast or browser version?

@Chardonneaur commented on May 23rd 2022
@sgiehl commented on May 23rd 2022 Member

I was able to reproduce that locally. Once the hash is appended to the url, every click will trigger a scroll to that anchor.
Might possibly be a vue regression. ping @diosmosis

@heurteph-ei commented on May 23rd 2022

I confirm I have this behavior on Matomo 4.3.1

@diosmosis commented on May 23rd 2022 Member

@sgiehl I've seen this before the vue migration, had something to do with the angularjs digest cycle (you should be able to see infinite digest errors in the console). Curiously it does not happen if I scroll my mousewheel, only if I use the scroll bar itself. Actually if I remember correctly it's due to the URL being like #CustomTranslations, if it's set to #/CustomTranslations it works fine. This happened on another page w/ links like this.

@sgiehl commented on May 23rd 2022 Member

you should be able to see infinite digest errors in the console

yes, that's right. wondering why the scrolling is triggered on every activity even though the URL doesn't change 🤔
The URL handling is still done by angular, right? Maybe that will get fixed when this part is migrated to vue as well?

@diosmosis commented on May 23rd 2022 Member

@sgiehl It's due to the URL not matching what angularjs expects. As in its in the format #CustomTranslations and not #/...?.... My guess is, because of this, angularjs is not able to handle the URL change, and just keeps trying to (ie, sees URL is changed to #CustomTranslations which is different from stored state, fails to parse and handle it, checks watches again, sees URL does not match stored state, fails to parse it again, etc.).

Maybe that will get fixed when this part is migrated to vue as well?

Probably. It can also be fixed now by changing the URLs to start with a /.

@Chardonneaur commented on May 24th 2022

@diosmosis oh great, so it can be fixed within the next Matomo version?

@diosmosis commented on May 24th 2022 Member

@Chardonneaur I'm not in charge or prioritization you'd want to ask someone else.

@justinvelluppillai commented on May 25th 2022 Contributor

@Chardonneaur yes we aim to fix all regressions quickly. I have added this to the current milestone for Matomo 4.11.0

@Chardonneaur commented on May 25th 2022

Perfect, thank you so much.

This Issue was closed on May 26th 2022
Powered by GitHub Issue Mirror