Ensure input connection to be created on pressing next button
We have recently introduced a logic to return null input connection in View#onCreateInputConnection() to handle the physical keyboard case better. (https://codereview.chromium.org/1362603002) However, when the user is focused on a EditText and jumps to WebView using 'next' button on an input method, then the user cannot type a character because a real input connection was never created. WebView cannot distinguish the following two cases: - Gaining focus with autofocus=true (for which we intentionally do not show keyboard) - Gaining focus through 'next' button Before that CL, we were simply creating NONE type input connection at the beginning even when input form was not focused, which caused the original physical keyboard issue. In this CL, we will keep an input connection *whenever* currently focused node is editable, regardless of showIme value. Some tests should change accordingly: now input connection may not be null even when keyboard remains hidden. Also I'm adding a WebView test to prevent a regression. BUG=569556 Review URL: https://codereview.chromium.org/1534163002 Cr-Commit-Position: refs/heads/master@{#366583}
Showing
Please register or sign in to comment