Commit 8df992ad authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Local NTP: Tell the browser if we start with keycapture enabled

This fixes a problem where both Omnibox and fakebox could have visible
focus at the same time.

Bug: 792850
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Id4801641c1ee192ffef943ecb738abf41fecc348
Reviewed-on: https://chromium-review.googlesource.com/827076Reviewed-by: default avatarChris Pickel <sfiera@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524082}
parent 7382ee76
...@@ -656,6 +656,12 @@ function init() { ...@@ -656,6 +656,12 @@ function init() {
// Update the fakebox style to match the current key capturing state. // Update the fakebox style to match the current key capturing state.
setFakeboxFocus(searchboxApiHandle.isKeyCaptureEnabled); setFakeboxFocus(searchboxApiHandle.isKeyCaptureEnabled);
// Also tell the browser that we're capturing, otherwise it's possible that
// both fakebox and Omnibox have visible focus at the same time, see
// crbug.com/792850.
if (searchboxApiHandle.isKeyCaptureEnabled) {
searchboxApiHandle.startCapturingKeyStrokes();
}
// Load the Doodle. After the first request completes (getting cached // Load the Doodle. After the first request completes (getting cached
// data), issue a second request for fresh Doodle data. // data), issue a second request for fresh Doodle data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment