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
Marketplace when closing popover it scrolls to top #7798
Comments
Thanks @Globulopolis for the feedback we didn't notice that one. |
It is caused by this: https://github.com/piwik/piwik/blob/2.13.0-rc3/plugins/CoreHome/javascripts/popover.js#L47 This will call https://github.com/piwik/piwik/blob/2.13.0-rc3/plugins/CoreHome/javascripts/broadcast.js#L381 which causes the page to scroll to top here: https://github.com/piwik/piwik/blob/2.13.0-rc3/libs/jquery/jquery.history.js#L14 This won't be an easy fix. We could store the current scroll position and restore it afterwards but then it the page will jump. According to eg this blog post we could use the actual history API: http://lea.verou.me/2011/05/change-url-hash-without-page-jump/ . The history plugin that we use is outdated and no longer maintained since beginning 2012 : http://tkyk.github.io/jquery-history-plugin/ . Maybe we should consider using another history plugin. The author of this plugin recommends the following plugin: https://github.com/cowboy/jquery-hashchange @sgiehl any thoughts here maybe? |
I think this can be solved easily w/ a proxy in between broadcast & jquery's history plugin. I'll work on a PoC. |
…ssue. Fix involves using angular service that uses the singleton instead of jquery's history plugin. Can remove the history plugin after this change.
Fixed the issue in a PR (#7869) w/o a new library. Instead of using jquery's history plugin, we can just use angular's |
…ssue. Fix involves using angular service that uses the singleton instead of jquery's history plugin. Can remove the history plugin after this change.
…ssue. Fix involves using angular service that uses the singleton instead of jquery's history plugin. Can remove the history plugin after this change.
Hi!
I've found that the page scroll to top every time when the plugin info modal close or mouse click on the grey area outside of the modal.
I think that this is wrong behavior, because we lose focus on information which we see.
The text was updated successfully, but these errors were encountered: