-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
-
Have you checked closed issues? (https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed)
-
Have you checked against the most recent version of Textual? (https://pypi.org/search/?q=textual)
Consider discussions!
Issues are for actionable items only.
If Textual crashes or behaves differently from the docs, then submit an issue.
If you want to know how to do something, or you have a suggestion for a new feature, then open a discussion (https://github.com/Textualize/textual/discussions/).
For realtime help, join our discord server (https://discord.gg/Enf6Z3qhVr)
The bug
If you make a ListView which is long enough to need a scroll, and you use your mouse to scroll (as in, click and hold on the scrollbar and drag up and down), and your mouse happens to move off the scrollbar sideways into the ListView as you are holding and scrolling, it will boost items based on where your cursor hovers, however some of these will stay boosted, resulting in multiple boosted ListItem items. Here is a minimum PoC:
from textual.app import App, ComposeResult
from textual.widgets import ListView, ListItem, Static
class MyApp(App):
def compose(self) -> ComposeResult:
yield ListView()
def on_mount(self):
lv = self.query_one(ListView)
for _ in range(200):
item = ListItem(Static(str(_)))
lv.append(item)
if __name__ == "__main__":
MyApp().run()
And here is a screenshot showing the issue:
