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

fix(RichLabel): link focus #950

Merged
merged 2 commits into from
Jun 9, 2024
Merged

fix(RichLabel): link focus #950

merged 2 commits into from
Jun 9, 2024

Conversation

GeopJr
Copy link
Owner

@GeopJr GeopJr commented May 19, 2024

Found while debugging a bug posted on Matrix:

In the 0.7 release, we introduced better keyboard navigation by remembering the last focused widget before showing a new timeline, and re-focusing when returning back. That way people using keyboard navigation won't have to start from the top.

GtkLabel is responsible for its links / we don't have access to them, not as widgets. That meant that it's also responsible for their focus, and clicking one of those links (notice: with a pointer device, not keyboard - that way it hasn't been in focus) wouldn't set it as focused and therefore when you went back to the previous timeline, it would start at the top.

Since timelines can only change when activating one of those links, the solution is to grab focus before handling the link. That way the previous timeline has the chance to update its last widget.

@GeopJr GeopJr merged commit 4c78d6b into main Jun 9, 2024
5 checks passed
@GeopJr GeopJr deleted the fix/richlabel/link-focus branch June 9, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant