Skip to content

Commit

Permalink
Add missing request_render call when setting text selection from Ac…
Browse files Browse the repository at this point in the history
…cessKit (#803)

Without this, the updated text selection is neither painted nor
reflected in an updated accessibility tree until the user presses a key.
  • Loading branch information
mwcampbell authored Feb 21, 2025
1 parent 5e85438 commit 642818d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions masonry/src/widgets/text_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,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());
self.rendered_generation = new_generation;
}
}
}
}
Expand Down

0 comments on commit 642818d

Please sign in to comment.