Skip to content

Selection crash with 'ValueError: No common ancestor found' #6452

Closed

Description

@TomJGooding

This might seem like a contrived example, but it honestly happened my first time trying out the new auto-scrolling on select feature.

I ran the textual demo and started trying to select the text on the home page. The notification toast ends up getting selected as well, which actually prevents the auto-scrolling.

Screenshot

After the waiting for the notification to timeout and moving the mouse to try to auto-scroll the selection, the app crashes with ValueError: No common ancestor found.

Perhaps the notifications just shouldn't be included in the selection, but presumably this could be a problem with any widget that could be removed from the DOM?

Activity

  1. github-actions commented on Mar 28, 2026

    @github-actions

    Thank you for your issue. Give us a little time to review it.

    PS. You might want to check the FAQ if you haven't done so already.

    This project is developed and maintained by Will McGugan. Consider sponsoring Will's work on this project (and others).

    This is an automated reply, generated by FAQtory

  2. willmcgugan commented on Mar 29, 2026

    @willmcgugan
    Member

    Thanks., An obvious edge case in retrospect.

  3. github-actions commented on Mar 29, 2026

    @github-actions

    I hope I solved your issue!

    Consider sponsoring my work to continue to maintain and develop Textual.

    • Will McGugan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions