You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a variation of #5631, but the workaround I used there doesn't seem to work here so I thought it worth writing up as a separate MRE of a possibly-different effect.
That is: the list is populated, the highlight is on the last item, the vertical scrollbar is in the correct place.
If you then press space you see this:
Again: all good; the list is repopulated and there is no vertical scrollbar visible.
If you press space again you see this:
Here the list is repopulated with lots of items, the highlight is on the first item (as intended), but the vertical scrollbar is positioned as if we were on the last item.
Even doing some form of call_after_refresh to reset the highlight doesn't seem to help. I can get the effect I would expect by tearing down and recreating the OptionList, of course:
This might be a variation of #5631, but the workaround I used there doesn't seem to work here so I thought it worth writing up as a separate MRE of a possibly-different effect.
Given this code:
when you first run it you see this:
That is: the list is populated, the highlight is on the last item, the vertical scrollbar is in the correct place.
If you then press space you see this:
Again: all good; the list is repopulated and there is no vertical scrollbar visible.
If you press space again you see this:
Here the list is repopulated with lots of items, the highlight is on the first item (as intended), but the vertical scrollbar is positioned as if we were on the last item.
Even doing some form of
call_after_refresh
to reset the highlight doesn't seem to help. I can get the effect I would expect by tearing down and recreating theOptionList
, of course:Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: