Skip to content
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

ScrollViewer with SelectableTextBlock scrolls up when focus changes #18252

Open
kaymyst opened this issue Feb 19, 2025 · 0 comments
Open

ScrollViewer with SelectableTextBlock scrolls up when focus changes #18252

kaymyst opened this issue Feb 19, 2025 · 0 comments
Labels

Comments

@kaymyst
Copy link

kaymyst commented Feb 19, 2025

Describe the bug

Describe the bug
If I scroll down a ScrollViewer with a SelectableTextBlock and I select the text inside, then switch the focus to another app and back the scrollviewer will have scrolled up to the top and unselected the text . See the video below.

To Reproduce

Add a ScrollViewer with MaxWidth and MaxHeight for easier observation.
Add a SelectableTextBlock inside the ScrollViewer.
Put a lot of text inside the SelectableTextBlock.
Run the app, scroll down the ScrollViewer a bit.
Try selecting the text.
Switch to a different app and back

Expected behavior

Scrollviewer stays at same position and text remains selected

Avalonia version

11.2.4

OS

Windows

Additional context

Video
https://github.com/user-attachments/assets/32de29ed-f3dc-4836-84a9-f353e5acd8ef

Example Code

AvaloniaApplicationSelectScroll.zip

@kaymyst kaymyst added the bug label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant