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

Add missing request_render call when setting text selection from AccessKit #803

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions masonry/src/widget/text_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,12 @@ impl<const EDITABLE: bool> Widget for TextArea<EDITABLE> {
self.editor
.driver(fctx, lctx)
.select_from_accesskit(selection);
let new_generation = self.editor.generation();
if new_generation != self.rendered_generation {
ctx.request_render();
ctx.set_ime_area(self.ime_area());
Comment on lines +827 to +828
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this is correct, but I wonder if we should for simplicity just use request_layout here.

Ultimately, PlainEditor does a terrible job at distinguishing between the reasons for the generation changing. I think we will want to split the concepts out at some point.

self.rendered_generation = new_generation;
}
}
}
}
Expand Down
Loading