AccessKit / accesskit

UI accessibility infrastructure across platforms and programming languages
BSD 3-Clause "New" or "Revised" License
990 stars 48 forks source link

fix: Clamp character index when getting focus from a text selection #428

Closed DataTriny closed 1 month ago

DataTriny commented 1 month ago

Relates to #416

Given an egui multiline text area, there is another way to get a panic, as reported to me by a Linux user:

This fix makes Node::text_selection_focus consistent with Node::text_selection and prevents panicking, but doesn't fix the underlying issue in egui, as "world" is now announced instead of "blank".