-
Notifications
You must be signed in to change notification settings - Fork 311
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
[BUG] ListBox wrapped in AttrMap is not scrollable with ScrollBar #878
Labels
Comments
rsekman
added a commit
to rsekman/urwid
that referenced
this issue
Apr 30, 2024
rsekman
added a commit
to rsekman/urwid
that referenced
this issue
Apr 30, 2024
6 tasks
rsekman
added a commit
to rsekman/urwid
that referenced
this issue
Apr 30, 2024
penguinolog: `w.original_widget` can point to `w`, we need to filter such behaviour to prevent infinite loop
rsekman
added a commit
to rsekman/urwid
that referenced
this issue
Apr 30, 2024
Note that this bug also affects the |
penguinolog
added a commit
that referenced
this issue
May 14, 2024
…879) * fix: make ScrollBar check wrapped widgets for SupportsScroll (Fixes #878) * tests: add tests for scrollable widgets wrapped in AttrMap * fix: avoid possible infinite loop in Scrollable/ScrollBar (#878) penguinolog: `w.original_widget` can point to `w`, we need to filter such behaviour to prevent infinite loop * fixup! fix: avoid possible infinite loop in Scrollable/ScrollBar (#878) * Update urwid/widget/scrollable.py Fix static checker warning --------- Co-authored-by: Alexey Stepanov <penguinolog@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
Wrapping a
ListBox
in anAttrMap
should be transparent for operations such as adding aScrollBar
, but throws because theAttrMap
is not realised to be scrollable.Affected versions (if applicable)
master
branch (7300acf)pypi
Steps to reproduce (if applicable)
Expected/actual outcome
Expected behaviour:
w
can be scrolled as if it were not wrapped in anAttrMap
.Actual behaviour:
Cause
While
Scrollable
is aware of wrappers and descends into them to see if the original widgets are scrollableurwid/urwid/widget/scrollable.py
Lines 615 to 625 in 7300acf
ScrollBar
is not and does noturwid/urwid/widget/scrollable.py
Lines 484 to 485 in 7300acf
Fix
Make the check in
ScrollBar
analogous to the check inScrollable
.The text was updated successfully, but these errors were encountered: