-
Notifications
You must be signed in to change notification settings - Fork 780
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
Possible issue with component classes, perhaps mixed with pseudo-classes #1879
Comments
Your example code works correctly in 0.11.1. Something definitely broke with 0.12. |
Note to self: take a look at |
Closing - this was fixed in 0.17.0 on March 29 2023. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
@darrenburns I do not believe this is fixed. I just tested with the sample code that Dave posted. |
Of course, now that I've said that, I can't seem to reproduce again for a screenshot to show you. Will keep trying later today. |
Testing here with 0.19.1, and also with
|
The Column 3 effect above is easily reproduced. Position your mouse at left side of the screen hovering over Column 1 of a data table. Then simply move your mouse to the right edge of the screen. Each Column 3 your mouse passes over will remain highlighted. |
Dirty fix for the Cell 0,0 and focus issue mentionned by @davep :
|
I've tracked it down to this flow of events:
[14:52:10] DEBUG screen.py:381
DataTable(pseudo_classes={'enabled', 'focus-within'}) was focused
[14:52:10] PRINT _data_table.py:1628
retrieved cursor style = #ffdddd on #ff0000
[14:52:10] PRINT stylesheet.py:534
nodes getting updated = {DataTable(pseudo_classes={'enabled', 'focus',
'focus-within'})} |
I believe this should be fixed with #2304 (v0.20.0+) |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Coming from a report on Discord, it looks like there may be an issue with mixing pseudo-classes and component classes. I've not dived too deeply into this yet, just managed to create an isolated example of misbehaviour, so I'm recording it here at least as a placeholder.
The following code aims to set up a grid of datatables, using CSS to have the focused table have a different cursor colour from an unfocused table:
If you run it you'll notice that the cursor colour does change under some circumstances, but not in the way you'd expect.
Tested with 0.12.0 so far; when I get a moment I'll revert to 0.11.1 and see how it worked there.
The text was updated successfully, but these errors were encountered: