mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
We receive the `Ime::Disabled` event both when the user dismisses the IME and when Servo itself dismisses it (for instance, when changing focus on the page). Servo will blur the current element upon receiving `ImeEvent::Dismissed`, leading to spurious focus behavior. Address this by only sending this message to Servo when it was triggered by the user (as best as we can tell). This problem was revealed by improvements in the internal focus APIs. This is a bit of a bandaid until we have a more robust IME API. There are still missing pieces in both Servo and in winit. Testing: This is a bit tricky to test as it depends a lot on when messages are sent to servoshell from winit / the windowing system and when Servo processes focus events. Signed-off-by: Martin Robinson <mrobinson@igalia.com>