libservo: Add allow_virtual_keyboard flag for InputMethodControl (#42467)

Following the convention of other major UAs of gating the virtual
keyboard by certain user activation, adding a flags to let the embedder
knows about the user activation. This would be used to determine whether
the virtual keyboard needs to be shown or not in android and ohos.

Testing: Manual testing.

---------

Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Steven Novaryo
2026-02-24 15:30:49 +08:00
committed by GitHub
parent facab8f642
commit ad358de589
6 changed files with 18 additions and 2 deletions

View File

@@ -187,6 +187,8 @@ impl HTMLTextAreaElement {
text: self.Value().to_string(),
insertion_point: self.GetSelectionEnd(),
multiline: false,
// We follow chromium's heuristic to show the virtual keyboard only if user had interacted before.
allow_virtual_keyboard: self.owner_window().has_sticky_activation(),
}),
None,
);