diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-11 22:12:48 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-11 22:12:48 +0000 |
commit | e02776fc39eed1b030143018979cc8e135aab3e0 (patch) | |
tree | 625c2504ed07a1e53efaa11231277ea09e4e8594 | |
parent | 28498be9e088bad1fcc26dda6d5d7203ea341b90 (diff) | |
download | chromium_src-e02776fc39eed1b030143018979cc8e135aab3e0.zip chromium_src-e02776fc39eed1b030143018979cc8e135aab3e0.tar.gz chromium_src-e02776fc39eed1b030143018979cc8e135aab3e0.tar.bz2 |
Merge 216622 "Regression: Unfocusing a list should trigger commi..."
> Regression: Unfocusing a list should trigger commitedit behavior.
>
> Revert r216081, and fix crbug.com/269291 by another approach.
> We should not skip hasElementFocus=false even if nothing is focused
> because startup_overlay adds new item when the list loses focus.
>
> We re-introduce longer delay for blur checking. The delay was removed
> in r73854 [1].
>
> [1] http://src.chromium.org/viewvc/chrome?view=revision&revision=73854
>
> BUG=268291,269321
Review URL: https://chromiumcodereview.appspot.com/22638003
TBR=tkent@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/branches/1547/src@216903 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/webui/resources/js/cr/ui/list.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js index 58a8364..1340adf 100644 --- a/ui/webui/resources/js/cr/ui/list.js +++ b/ui/webui/resources/js/cr/ui/list.js @@ -515,13 +515,15 @@ cr.define('cr.ui', function() { // When the blur event happens we do not know who is getting focus so we // delay this a bit until we know if the new focus node is outside the // list. + // We need 51 msec delay because InlineEditableList sets focus after + // 50 msec. var list = this; var doc = e.target.ownerDocument; window.setTimeout(function() { var activeElement = doc.activeElement; - if (activeElement != doc.body && !list.contains(activeElement)) + if (!list.contains(activeElement)) list.hasElementFocus = false; - }); + }, 51); }, /** |