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

Dashboard selector listing all widgets is hidden once the scroll bar is used #13608

Merged
merged 2 commits into from Nov 24, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Oct 15, 2018

fix #13489

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Oct 15, 2018
@tsteur tsteur added this to the 3.7.0 milestone Oct 15, 2018
@diosmosis
Copy link
Member

Tested on windows and it looks like it solves the problem in some cases but not all. Here's an example of it not working:

https://ufile.io/ores8

Didn't look into why exactly. Can probably merged though since it's not that big a bug.

@tsteur
Copy link
Member Author

tsteur commented Oct 15, 2018

might just need a hire timeout maybe?

@diosmosis
Copy link
Member

Maybe we could keep the scroll timeout going if the mouse is still pressed?

@tsteur
Copy link
Member Author

tsteur commented Oct 15, 2018

@diosmosis I watched the video but not sure what happened in this case? Does it sometimes work in that browser and sometimes not?

The problem is that we can't really detect whether user is scrolling with touchpad or mousewheel or by using mouse click with scrollbar. Unless we maybe check if the position of the mouse is currently pretty much on the very right but making this all work can be tricky I reckon. Eg the mouse might be also moved while using the touchpad. So we would need to check if maybe mouseDown occurred, then scroll event => disable closing feature, meanwhile no mouseUp, on mouse up we enable closing feature again after short timeout or so. Not sure if it's worth it when it works in most cases. To be seen how it can be reproduced.

@diosmosis
Copy link
Member

Think you detect if mouse is down, then in the timeout if it's down, schedule another 500ms timeout. When the mouse goes back up, the timeout gets cleared so even if the user pauses for a while while scrolling, it won't close the dropdown.

@tsteur
Copy link
Member Author

tsteur commented Oct 15, 2018

done

@diosmosis
Copy link
Member

Thanks, I realize it's probably not that important, but figured it was a simple change to apply.

Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it in Chrome, Firefox and Opera. Seems to work as expected 👍

@sgiehl sgiehl merged commit 058fe3a into 3.x-dev Nov 24, 2018
@sgiehl sgiehl deleted the 13489 branch November 24, 2018 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard selector listing all widgets is hidden once the scroll bar is used
3 participants