diff options
author | Paul Rouget <me@paulrouget.com> | 2020-07-13 14:04:06 +0200 |
---|---|---|
committer | Paul Rouget <me@paulrouget.com> | 2020-07-13 14:04:06 +0200 |
commit | 6252d36a14399153af09be2b9572edda3c14043e (patch) | |
tree | fd771e30ae41bc20a4838e586d5b49b45361c7b1 /components/script/dom/document.rs | |
parent | 967a70bd60abbd53f601906b84c46c4d79072cd1 (diff) | |
download | servo-6252d36a14399153af09be2b9572edda3c14043e.tar.gz servo-6252d36a14399153af09be2b9572edda3c14043e.zip |
Unfocus input when virtual keyboard is dismissed
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 437b147678d..8244f4af31f 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -1722,6 +1722,13 @@ impl Document { self.window.reflow(ReflowGoal::Full, ReflowReason::KeyEvent); } + pub fn ime_dismissed(&self) { + self.request_focus( + self.GetBody().as_ref().map(|e| &*e.upcast()), + FocusType::Element, + ) + } + pub fn dispatch_composition_event( &self, composition_event: ::keyboard_types::CompositionEvent, |