Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Issue 2709633002: Make chrome hide keyboard when opening a new window (Closed)

Created:
3 years, 10 months ago by yabinh
Modified:
3 years, 10 months ago
CC:
agrieve+watch_chromium.org, android-webview-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make chrome hide keyboard when opening a new window We should hide keyboard when opening a new window in Chrome. The CL https://codereview.chromium.org/2290133002 moves the hidding logic from onViewFocusChanged() to onViewDetachedFromWindow() and onAttach(). But the view will not be active when it is detached from window, so the keyboard will not be hidden. To fix that, this CL brings back the hidding logic to onViewFocusChanged(). Thus, we are able to hide keyboard before the view becomes inactive. Since we don’t want to change the current behavior of Webview, i.e., not hiding keyboard when losing focus, so we pass a parameter to distinguish that. To avoid possible regressions, this CL keeps the previous hiding logic in onViewDetachedFromWindow() and onAttach(). Alternatively, we can use a tab observer to determine when to hide keyboard, but it will increase code coupling, so we stick to the above method. BUG=677646 Review-Url: https://codereview.chromium.org/2709633002 Cr-Commit-Position: refs/heads/master@{#451950} Committed: https://chromium.googlesource.com/chromium/src/+/44b7e0d7c92d708fdc64cb2357bbb2a712551b94

Patch Set 1 #

Total comments: 4

Patch Set 2 : Change the papameter name #

Total comments: 2

Patch Set 3 : Add a comment #

Messages

Total messages: 38 (26 generated)
yabinh
changwan@, PTAL, especially the description.
3 years, 10 months ago (2017-02-21 04:39:15 UTC) #9
Changwan Ryu
lgtm w/ nits Could you also refer to the old CL in the CL description? ...
3 years, 10 months ago (2017-02-21 05:16:39 UTC) #10
yabinh
On 2017/02/21 05:16:39, Changwan Ryu wrote: > lgtm w/ nits > > Could you also ...
3 years, 10 months ago (2017-02-21 06:18:09 UTC) #18
yabinh
https://codereview.chromium.org/2709633002/diff/1/content/public/android/java/src/org/chromium/content/browser/ContentView.java File content/public/android/java/src/org/chromium/content/browser/ContentView.java (right): https://codereview.chromium.org/2709633002/diff/1/content/public/android/java/src/org/chromium/content/browser/ContentView.java#newcode154 content/public/android/java/src/org/chromium/content/browser/ContentView.java:154: mContentViewCore.onFocusChanged(gainFocus, true); On 2017/02/21 05:16:39, Changwan Ryu wrote: > ...
3 years, 10 months ago (2017-02-21 06:18:31 UTC) #19
yabinh
aelias@,PTAL. Thank!
3 years, 10 months ago (2017-02-21 06:21:18 UTC) #21
yabinh
FYI, I just confirmed that this CL won't change the behavior of Webview.
3 years, 10 months ago (2017-02-21 09:03:32 UTC) #24
aelias_OOO_until_Jul13
lgtm, adding boliu@ and dtrainor@ for OWNERS.
3 years, 10 months ago (2017-02-22 01:52:42 UTC) #26
boliu
lgtm % comment https://codereview.chromium.org/2709633002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2709633002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode3235 android_webview/java/src/org/chromium/android_webview/AwContents.java:3235: mContentViewCore.onFocusChanged(focused, false); document parameter name
3 years, 10 months ago (2017-02-22 02:45:50 UTC) #27
yabinh
Thanks! dtrainor@, PTAL. https://codereview.chromium.org/2709633002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2709633002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode3235 android_webview/java/src/org/chromium/android_webview/AwContents.java:3235: mContentViewCore.onFocusChanged(focused, false); On 2017/02/22 02:45:50, boliu ...
3 years, 10 months ago (2017-02-22 03:40:05 UTC) #30
David Trainor- moved to gerrit
lgtm!
3 years, 10 months ago (2017-02-22 05:05:19 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2709633002/40001
3 years, 10 months ago (2017-02-22 05:28:42 UTC) #35
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 09:15:28 UTC) #38
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/44b7e0d7c92d708fdc64cb2357bb...

Powered by Google App Engine
This is Rietveld 408576698