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

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

Issue 399613002: Anti-shelf-overlapping fixes for several menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Helper function extracted. Created 6 years, 5 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
Index: ui/login/account_picker/screen_account_picker.js
diff --git a/ui/login/account_picker/screen_account_picker.js b/ui/login/account_picker/screen_account_picker.js
index 3d14d363ccefe5c64b1e5238adc9a21fce7c8b77..3d216fa942b0ddc22a5dce635c6c9351f8b9537a 100644
--- a/ui/login/account_picker/screen_account_picker.js
+++ b/ui/login/account_picker/screen_account_picker.js
@@ -162,6 +162,15 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
cr.ui.Bubble.Attachment.BOTTOM,
error,
BUBBLE_OFFSET, BUBBLE_PADDING);
+ // Move error bubble up if it overlaps the shelf.
+ var maxHeight =
+ cr.ui.LoginUiTools.getMaxHeightBeforeShelfOverlapping($('bubble'));
+ if (maxHeight < $('bubble').offsetHeight) {
+ $('bubble').showContentForElement(activatedPod.mainInput,
+ cr.ui.Bubble.Attachment.TOP,
+ error,
+ BUBBLE_OFFSET, BUBBLE_PADDING);
+ }
}
},

Powered by Google App Engine
This is Rietveld 408576698