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

Unified Diff: ui/login/account_picker/md_screen_account_picker.js

Issue 2945153002: Fix handling for click that brings lock screen app to foreground (Closed)
Patch Set: . Created 3 years, 6 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 | ui/login/account_picker/md_user_pod_row.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/md_screen_account_picker.js
diff --git a/ui/login/account_picker/md_screen_account_picker.js b/ui/login/account_picker/md_screen_account_picker.js
index 88ca6736d29011c8e2b851dff02530fac037c0be..ef7337a40cf29a5cef45cd530cb5a2611a51dd57 100644
--- a/ui/login/account_picker/md_screen_account_picker.js
+++ b/ui/login/account_picker/md_screen_account_picker.js
@@ -116,6 +116,10 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
*/
onBeforeShow: function(data) {
this.showing_ = true;
+
+ this.ownerDocument.addEventListener('click',
+ this.handleOwnerDocClick_.bind(this));
+
chrome.send('loginUIStateChanged', ['account-picker', true]);
$('login-header-bar').signinUIState = SIGNIN_UI_STATE.ACCOUNT_PICKER;
// Header bar should be always visible on Account Picker screen.
@@ -480,11 +484,6 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
this.lockScreenAppsState_ = state;
$('login-header-bar').lockScreenAppsState = state;
- // When an lock screen app window is in background - i.e. visible behind
- // the lock screen UI - dim the lock screen background, so it's more
- // noticeable that the app widow in background is not actionable.
- $('background').classList.toggle(
- 'dimmed-background', state == LOCK_SCREEN_APPS_STATE.BACKGROUND);
},
/**
@@ -495,8 +494,9 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
* @param {Event} event The click event.
*/
handleOwnerDocClick_: function(event) {
- if (this.lockScreenAppsState_ != LOCK_SCREEN_APPS_STATE.BACKGROUND ||
- event.target != $('outer-container')) {
+ if (this.lockScreenAppsState_ != LOCK_SCREEN_APPS_STATE.BACKGROUND ||
+ (event.target != $('account-picker') &&
+ event.target != $('version'))) {
return;
}
chrome.send('setLockScreenAppsState',
« no previous file with comments | « no previous file | ui/login/account_picker/md_user_pod_row.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698