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

Dropdown list is scrolling when hovering over the last visible item #1028

Closed
tstoik opened this issue Dec 18, 2019 · 5 comments · Fixed by #1160
Closed

Dropdown list is scrolling when hovering over the last visible item #1028

tstoik opened this issue Dec 18, 2019 · 5 comments · Fixed by #1160
Labels

Comments

@tstoik
Copy link

tstoik commented Dec 18, 2019

Describe the bug
When hovering over the last visible item in the dropdown, the list begins to automatically scroll without user action.

To Reproduce
Steps to reproduce the behavior:

  1. Open dropdown
  2. Hover individual items as you make your way down the list.
  3. As you over over the last visible item in the list, especially if it is partially visible, the list start scrolling rapidly to the bottom

https://cl.ly/a0e39463867c

In the video linked above, I am not using the scrollwheel or taking any action that would cause the list to scroll, yet it scrolls whenever I hover over the last visible item.

Expected behavior
Ability to hover over all items without triggering scrolling.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS Catalina
  • Browser: Firefox 71 & Chrome 79
@space-bro
Copy link

space-bro commented Jan 23, 2020

@tstoik try replacing method maybeAdjustScroll()

maybeAdjustScroll() {
        const pixelsToPointerTop = this.pixelsToPointerTop();
        const pixelsToPointerBottom = this.pixelsToPointerBottom();

        if (pixelsToPointerTop <= this.viewport().top) {
            return this.scrollTo(pixelsToPointerTop);
        } else if (pixelsToPointerBottom >= this.viewport().bottom) {
            return this.scrollTo(pixelsToPointerBottom - (this.viewport().bottom - this.viewport().top));
        }
    }

@opassion
Copy link

opassion commented Feb 4, 2020

@ccartrec does this mean I need to fork this and fix it myself?

@space-bro
Copy link

space-bro commented Feb 5, 2020

@opassion yes=) you should find maybeAdjustScroll() in pointerScroll.ts and replace on this

@andreasvirkus
Copy link
Contributor

andreasvirkus commented Mar 31, 2020

@opassion you could also extend the component and override the method

#449 (comment)

sagalbot added a commit that referenced this issue Apr 12, 2020
sagalbot added a commit that referenced this issue Apr 12, 2020
* feat: add autoscroll boolean prop

Fixes #449

* refactor: update autoscroll implementation

Closes #1028
Closes #910

* refactor: only call maybeAdjustScroll in the watcher

* docs: upgrade vuepress
@github-actions
Copy link

🎉 This issue has been resolved in version 3.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants