diff --git a/src/textual/app.py b/src/textual/app.py index 561eceeac..5889e97f5 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -462,9 +462,6 @@ class App(Generic[ReturnType], DOMNode): SUSPENDED_SCREEN_CLASS: ClassVar[str] = "" """Class to apply to suspended screens, or empty string for no class.""" - HOVER_EFFECTS_SCROLL_PAUSE: ClassVar[float] = 0.02 - """Seconds to pause hover effects for when scrolling.""" - _PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App[Any]], bool]]] = { "focus": lambda app: app.app_focus, "blur": lambda app: not app.app_focus, @@ -2824,8 +2821,6 @@ class App(Generic[ReturnType], DOMNode): Args: widget: Widget under mouse, or None for no widgets. """ - if widget is not None and widget.is_scrolling: - return if widget is None: if self.mouse_over is not None: try: diff --git a/tests/css/test_nested_css.py b/tests/css/test_nested_css.py index e73d67e68..bd6b5714a 100644 --- a/tests/css/test_nested_css.py +++ b/tests/css/test_nested_css.py @@ -72,10 +72,10 @@ async def test_lists_of_selectors_in_nested_css() -> None: class DeclarationAfterNestedApp(App[None]): CSS = """ Screen { + background: green; Label { background: red; - } - background: green; + } } """ diff --git a/tests/snapshot_tests/snapshot_apps/dock_scroll_off_by_one.py b/tests/snapshot_tests/snapshot_apps/dock_scroll_off_by_one.py index 563cd0aba..afbbf0966 100644 --- a/tests/snapshot_tests/snapshot_apps/dock_scroll_off_by_one.py +++ b/tests/snapshot_tests/snapshot_apps/dock_scroll_off_by_one.py @@ -4,7 +4,6 @@ from textual.widgets import Checkbox, Footer class ScrollOffByOne(App): AUTO_FOCUS = None - HOVER_EFFECTS_SCROLL_PAUSE = 0.0 def compose(self) -> ComposeResult: for number in range(1, 100): diff --git a/tests/snapshot_tests/snapshot_apps/scroll_to.py b/tests/snapshot_tests/snapshot_apps/scroll_to.py index bded6e5ff..986af6701 100644 --- a/tests/snapshot_tests/snapshot_apps/scroll_to.py +++ b/tests/snapshot_tests/snapshot_apps/scroll_to.py @@ -6,7 +6,6 @@ class ScrollOffByOne(App): """Scroll to item 50.""" AUTO_FOCUS = None - HOVER_EFFECTS_SCROLL_PAUSE = 0 def compose(self) -> ComposeResult: for number in range(1, 100): diff --git a/tests/test_lazy.py b/tests/test_lazy.py index 5beb59185..c430782be 100644 --- a/tests/test_lazy.py +++ b/tests/test_lazy.py @@ -39,10 +39,11 @@ async def test_lazy_reveal(): async with app.run_test() as pilot: # No #foo on initial mount - # Only first child should be visible initially + # Only first child should be available initially assert app.query_one("#foo").display - assert not app.query_one("#bar").display - assert not app.query_one("#baz").display + # Next two aren't mounted yet + assert not app.query("#bar") + assert not app.query("#baz") # All children should be visible after a pause await pilot.pause()