Settings: Home page URL is not shown if closing home page overlay by Enter key
commit0c458c671eaa28917e2e27733798df626f874f1f
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 31 Jul 2013 04:17:10 +0000 (31 04:17 +0000)
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 31 Jul 2013 04:17:10 +0000 (31 04:17 +0000)
tree69cd1077db6fc170f2422d33d4dcadfbdd1c3d01
parent3bf2ac1c856f91e69676b9fe366fa8ccfea1b320
Settings: Home page URL is not shown if closing home page overlay by Enter key

This fixes a problem similar to crbug.com/258345.

HomePageOverlay assumes a 'change' event is dispatched when it is
closed, before committing preference values in
SettingsDialog.handleConfirm(). 'blur' event for a URL field, which
triggers a 'change' event, is not dispatched if:
  * there is no focused element when opening the overlay, and
  * we close the overlay by Enter key
because OptionsPage.setOverlayVisible_() hides itself asynchronously and
the last focus is not restored.
We should make sure setOverlayVisible_(false) removes focus immediately.

BUG=263734

Review URL: https://chromiumcodereview.appspot.com/20141006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214558 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/resources/options/options_page.js