mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Notify the embedder when it should display or hide an IME
This commit is contained in:
parent
05fe8fa08d
commit
42886613d3
8 changed files with 93 additions and 2 deletions
|
@ -812,6 +812,11 @@ impl Document {
|
|||
elem.set_focus_state(false);
|
||||
// FIXME: pass appropriate relatedTarget
|
||||
self.fire_focus_event(FocusEventType::Blur, node, None);
|
||||
|
||||
// Notify the embedder to hide the input method.
|
||||
if elem.input_method_type().is_some() {
|
||||
self.send_to_constellation(ScriptMsg::HideIME);
|
||||
}
|
||||
}
|
||||
|
||||
self.focused.set(self.possibly_focused.get().r());
|
||||
|
@ -826,6 +831,11 @@ impl Document {
|
|||
if focus_type == FocusType::Element {
|
||||
self.send_to_constellation(ScriptMsg::Focus);
|
||||
}
|
||||
|
||||
// Notify the embedder to display an input method.
|
||||
if let Some(kind) = elem.input_method_type() {
|
||||
self.send_to_constellation(ScriptMsg::ShowIME(kind));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue