Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual keyboard does not appear when text inputs are focused #26898

Closed
jdm opened this issue Jun 12, 2020 · 8 comments
Closed

Virtual keyboard does not appear when text inputs are focused #26898

jdm opened this issue Jun 12, 2020 · 8 comments
Labels
Projects

Comments

@jdm
Copy link
Member

@jdm jdm commented Jun 12, 2020

void ServoControl::OnServoIMEStateChanged(bool) {
// FIXME:
// https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-implementingtextandtextrange
}

@jdm jdm added the A-embedding label Jun 12, 2020
@jdm jdm added this to To do in HoloLens Jun 12, 2020
@jdm
Copy link
Member Author

@jdm jdm commented Jun 22, 2020

This will probably require #26680 to be fixed for the keyboard to be useful, too.

@jdm
Copy link
Member Author

@jdm jdm commented Jun 22, 2020

The lack of this keyboard prevents testing any content that is hidden behind user/password access.

@jdm jdm changed the title Make virtual keyboard appear when text inputs are focused Virtual keyboard does not appear when text inputs are focused Jun 22, 2020
@jdm
Copy link
Member Author

@jdm jdm commented Jun 22, 2020

We might be able to use InputPane.GetForCurrentView().TryShow(). We may also need to rely on CoreTextEditContext.InputPaneDisplayPolicy and manually show the keyboard when the UI's URL bar is focused.

@jdm
Copy link
Member Author

@jdm jdm commented Jun 22, 2020

https://docs.microsoft.com/en-us/windows/uwp/design/input/respond-to-the-presence-of-the-touch-keyboard

Perhaps one option would be making the Servo control behave like a custom text input control.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jun 24, 2020

I'm looking at this.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jun 26, 2020

This will be implemented in 2 steps.

I'm going to initially land a simple text controller mechanism that implements key events and also sync our IME messages with the InputPane.

But the way Servo handles text inputs is too simplistic to implement correctly a text handler. We're missing pieces to get the proper behavior (like exposing selection range, caret position, etc, which is necessary to synchronize the field within the virtual keyboard). But UWP offers some possible fallback.

I'm also wondering if we should not let the embedder handle all the text/caret/selection/range behavior. That would be easy on Windows. Not sure about the winit port and Android.

I'll see later what is the best approach.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jun 26, 2020

On Desktop, no issue.

I think if we get to a point where can enter login and passwords on the device, it's a good enough first step.

@bors-servo bors-servo closed this in ee56d5d Jul 3, 2020
@atouchet atouchet moved this from To do to Done in HoloLens Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
HoloLens
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.