WebView: IME can't move focus out of a WebView by sending dpad events |
||||
Issue descriptionChrome Version: 64.0.3274.0 (Developer Build) unknown (32-bit) OS: Android Reported by Samsung (their keyboard has a feature called Cursor Control that is running into this bug). We currently support moving focus out of a WebView by calling View#dispatchKeyEvent(), but not by sending the key event through an open InputConnection. Originally filed as Google-internal b/67834591
,
Nov 22 2017
,
Nov 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21 commit f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21 Author: Ryan Landay <rlanday@chromium.org> Date: Wed Nov 22 22:17:15 2017 Allow IME dpad key events to move focus out of a WebView WebView currently supports dpad keydown events moving focus out of a WebView (e.g. to support things like the Nexus Player remote). However, we do not currently support this properly if the dpad events come in through an open InputConnection (vs. being dispatched directly to the view). TextView *does* support this, so I'm fixing WebView in this CL to match TextView's behavior. The issue is that Blink handles the dpad events differently depending on whether something called spatial navigation mode is enabled. Dispatching a dpad event to WebView enables it, and touch events disables it. I'm not intimately familiar with the details of spatial navigation mode and am not sure if it's still necessary or if we could do some refactoring in Blink to get rid of it. This CL takes a conservative approach and just wires up ImeAdapter to notify AwContents of dpad events so we can enable spatial navigation mode in this case. Bug: 787651 Change-Id: Ib4d0479ee75db8b53b990715b4f6a662fc0e52ec TBR=tedchoc@chromium.org Change-Id: Ib4d0479ee75db8b53b990715b4f6a662fc0e52ec Reviewed-on: https://chromium-review.googlesource.com/784123 Commit-Queue: Ryan Landay <rlanday@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#518770} [modify] https://crrev.com/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21/android_webview/java/src/org/chromium/android_webview/AwContents.java [modify] https://crrev.com/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21/android_webview/javatests/src/org/chromium/android_webview/test/AwImeTest.java [modify] https://crrev.com/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java [modify] https://crrev.com/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java [modify] https://crrev.com/f7c6aed9e1b358f66f60f2965a2348c6b9b4ad21/content/public/android/java/src/org/chromium/content_public/browser/ImeEventObserver.java
,
Nov 28 2017
Will be fixed in M64
,
Nov 30 2017
1.Verified on Samsung Galaxy S7 Edge (SM-G935T)/ NRD90M having 64.0.3281.0 with Email version :4.1.83.3 and keyboard:1.5.86 ,Down to Up swipe was moving the cursor to the previous tab ( Subject field) BUT 2.Not Verifiable on Samsung Galaxy J7 (SM-J710MN) / NRD90M having 64.0.3281.0 with Email version :4.1.82.0 and keyboard:2.0.21.30 and Cursor not moving to Subject field on swipe down to up ( Please clarify if this is intended).Thanks
,
Nov 30 2017
sbashyam@, you're saying the fix isn't working on the J7? Does using Cursor Control to move between the To and Subject fields work?
,
Nov 30 2017
Mistake in Comment #5 observation 2. Verifiable on Samusng Galaxy J7 /NRD90M .My bad was using google keyboard in the initial observation . While using Samsung Keyboard, Issue no longer observed on 64.0.3281.0 |
||||
►
Sign in to add a comment |
||||
Comment 1 by rlanday@chromium.org
, Nov 22 2017