summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-16 22:16:31 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-16 22:16:31 +0000
commit370368ecdb0ba2b15caf52aa525385642fd4d4cf (patch)
tree9a34a7ae6a1ced8ec3385cb172fdb50e3f935507 /chrome/browser/resources
parent3f534a43b777f51f28158c07f80b4d1b548bc298 (diff)
downloadchromium_src-370368ecdb0ba2b15caf52aa525385642fd4d4cf.zip
chromium_src-370368ecdb0ba2b15caf52aa525385642fd4d4cf.tar.gz
chromium_src-370368ecdb0ba2b15caf52aa525385642fd4d4cf.tar.bz2
NTP: Make sure the notifier does not get focused after it was hidden.
BUG=27833 TEST=See bug Review URL: http://codereview.chromium.org/387064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/new_new_tab.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index fd9ba96..a27bf06 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -817,6 +817,11 @@ function hideNotification() {
var actionLink = notificationElement.querySelector('.link-color');
// Prevent tabbing to the hidden link.
actionLink.tabIndex = -1;
+ // Setting tabIndex to -1 only prevents future tabbing to it. If, however, the
+ // user switches window or a tab and then moves back to this tab the element
+ // may gain focus. We therefore make sure that we blur the element so that the
+ // element focus is not restored when coming back to this window.
+ actionLink.blur();
}
function showFirstRunNotification() {