A link renders as plain (unstyled) text for as long as a text selection is active on the same line, even though it stays clickable.
Minimal reproduction code
from textual.app import App, ComposeResult
from textual.widgets import Static
class ReproApp(App[None]):
CSS = "Static { margin: 1 2; link-color: cyan; link-style: underline; }"
def compose(self) -> ComposeResult:
yield Static("See the [@click='app.bell()']docs[/] here, then drag-select this line.")
if __name__ == "__main__":
ReproApp().run()
Run it and drag-select across the line: the cyan underlined docs link turns plain.
Visual.to_strips only applies _apply_link_style when not widget.screen._selecting, so any widget re-rendered during a selection loses its link styling. The @click meta survives (the link stays clickable), only the visible color/underline is dropped .
Textual 8.2.8, Python 3.12.
A link renders as plain (unstyled) text for as long as a text selection is active on the same line, even though it stays clickable.
Minimal reproduction code
Run it and drag-select across the line: the cyan underlined
docslink turns plain.Visual.to_stripsonly applies_apply_link_stylewhennot widget.screen._selecting, so any widget re-rendered during a selection loses its link styling. The@clickmeta survives (the link stays clickable), only the visible color/underline is dropped .Textual 8.2.8, Python 3.12.