Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed

- Fixed a crash when applying `pointer` styles while changing theme before the screen stack is ready https://github.com/Textualize/textual/issues/6360

## [8.2.8] - 2026-06-30

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion src/textual/css/_style_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,11 +877,12 @@ def __set__(self, obj: StylesBase, value: EnumType | None = None):
parent=self._refresh_parent,
)
if self._pointer and obj.node is not None:
from textual.app import ScreenStackError
from textual.dom import NoScreen

try:
obj.node.screen.update_pointer_shape()
except NoScreen:
except (NoScreen, ScreenStackError):
pass


Expand Down
19 changes: 19 additions & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,25 @@ def compose(self) -> ComposeResult:
assert app.screen._pointer_shape == "pointer"


async def test_app_pointer_style_with_theme_before_screen_stack() -> None:
"""Regression test for https://github.com/Textualize/textual/issues/6360."""

class PointerThemeApp(App[None]):
CSS = """
* {
pointer: default;
}
"""

def __init__(self) -> None:
super().__init__()
self.theme = "textual-light"

app = PointerThemeApp()
async with app.run_test():
assert app.theme == "textual-light"


async def test_get_screen_stack() -> None:
"""Test get_screen_stack"""

Expand Down