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

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

Issue 592313002: history: reverse overlay buttons (they were previously incorrect). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@history-focus-test
Patch Set: combined Created 6 years, 3 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 | « chrome/browser/resources/history/alert_overlay.html ('k') | chrome/test/data/webui/history_browsertest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index 0f285966adf808ef26d31ec336be8e2068b9b8bc..e4aea4c569a833e48012304a51ff8681f5ecd526 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -1975,6 +1975,14 @@ function openClearBrowsingData(e) {
function showConfirmationOverlay() {
$('alertOverlay').classList.add('showing');
$('overlay').hidden = false;
+
+ // If an element is focused behind the confirm overlay, blur it so focus
+ // doesn't accidentally get stuck behind it.
+ if ($('history-page').contains(document.activeElement))
+ document.activeElement.blur();
+
+ $('history-page').setAttribute('aria-hidden', 'true');
+
uber.invokeMethodOnParent('beginInterceptingEvents');
}
@@ -1984,6 +1992,7 @@ function showConfirmationOverlay() {
function hideConfirmationOverlay() {
$('alertOverlay').classList.remove('showing');
$('overlay').hidden = true;
+ $('history-page').removeAttribute('aria-hidden');
uber.invokeMethodOnParent('stopInterceptingEvents');
}
@@ -1999,10 +2008,10 @@ function confirmDeletion(okCallback, cancelCallback) {
alertOverlay.setValues(
loadTimeData.getString('removeSelected'),
loadTimeData.getString('deleteWarning'),
- loadTimeData.getString('cancel'),
loadTimeData.getString('deleteConfirm'),
- cancelCallback,
- okCallback);
+ loadTimeData.getString('cancel'),
+ okCallback,
+ cancelCallback);
showConfirmationOverlay();
}
« no previous file with comments | « chrome/browser/resources/history/alert_overlay.html ('k') | chrome/test/data/webui/history_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698