mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Unfocus input when virtual keyboard is dismissed
This commit is contained in:
parent
967a70bd60
commit
6252d36a14
11 changed files with 91 additions and 2 deletions
|
@ -129,8 +129,8 @@ use profile_traits::time::{self as profile_time, profile, ProfilerCategory};
|
|||
use script_layout_interface::message::{self, LayoutThreadInit, Msg, ReflowGoal};
|
||||
use script_traits::webdriver_msg::WebDriverScriptCommand;
|
||||
use script_traits::CompositorEvent::{
|
||||
CompositionEvent, KeyboardEvent, MouseButtonEvent, MouseMoveEvent, ResizeEvent, TouchEvent,
|
||||
WheelEvent,
|
||||
CompositionEvent, IMEDismissedEvent, KeyboardEvent, MouseButtonEvent, MouseMoveEvent,
|
||||
ResizeEvent, TouchEvent, WheelEvent,
|
||||
};
|
||||
use script_traits::{
|
||||
AnimationTickType, CompositorEvent, ConstellationControlMsg, DiscardBrowsingContext,
|
||||
|
@ -3583,6 +3583,14 @@ impl ScriptThread {
|
|||
document.dispatch_key_event(key_event);
|
||||
},
|
||||
|
||||
IMEDismissedEvent => {
|
||||
let document = match self.documents.borrow().find_document(pipeline_id) {
|
||||
Some(document) => document,
|
||||
None => return warn!("Message sent to closed pipeline {}.", pipeline_id),
|
||||
};
|
||||
document.ime_dismissed();
|
||||
},
|
||||
|
||||
CompositionEvent(composition_event) => {
|
||||
let document = match self.documents.borrow().find_document(pipeline_id) {
|
||||
Some(document) => document,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue