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

Without this, the updated text selection is neither painted nor
reflected in an updated accessibility tree until the user presses a key.
This commit is contained in:
Matt Campbell 2025-02-21 10:34:16 -06:00 committed by GitHub
parent 5e854382b2
commit 642818dcee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}
}
}