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

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 6579022: Merge 74015 - NTP: Fix restore all... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/648/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.js
===================================================================
--- chrome/browser/resources/new_new_tab.js (revision 75822)
+++ chrome/browser/resources/new_new_tab.js (working copy)
@@ -1027,14 +1027,18 @@
var actionLink = notificationElement.querySelector('#actionlink');
var closeButton = notificationElement.querySelector('#notification-close');
// Prevent tabbing to the hidden link.
- actionLink.tabIndex = -1;
- closeButton.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();
- closeButton.blur();
+ if (actionLink) {
+ actionLink.tabIndex = -1;
+ actionLink.blur();
+ }
+ if (closeButton) {
+ closeButton.tabIndex = -1;
+ closeButton.blur();
+ }
}
function showFirstRunNotification() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698