Index: chrome/browser/resources/login/user_pod_row.js |
diff --git a/chrome/browser/resources/login/user_pod_row.js b/chrome/browser/resources/login/user_pod_row.js |
index 24fdb39d2e63738e83c2acf56c945474b5d73298..1d88e3040330220aa6fe138b53d88840a67da4c1 100644 |
--- a/chrome/browser/resources/login/user_pod_row.js |
+++ b/chrome/browser/resources/login/user_pod_row.js |
@@ -373,6 +373,14 @@ cr.define('login', function() { |
}, |
/** |
+ * Gets action box menu. |
+ * @type {!HTMLInputElement} |
+ */ |
+ get actionBoxMenu() { |
+ return this.querySelector('.action-box-menu'); |
+ }, |
+ |
+ /** |
* Gets action box menu title, user name item. |
* @type {!HTMLInputElement} |
*/ |
@@ -582,6 +590,8 @@ cr.define('login', function() { |
this.actionBoxAreaElement.classList.add('active'); |
} else { |
this.actionBoxAreaElement.classList.remove('active'); |
+ this.actionBoxAreaElement.classList.remove('menuMovedUp'); |
+ this.actionBoxMenu.classList.remove('menuMovedUp'); |
} |
}, |
@@ -832,6 +842,16 @@ cr.define('login', function() { |
this.actionBoxMenuRemoveElement.hidden = true; |
this.actionBoxRemoveUserWarningElement.hidden = false; |
this.actionBoxRemoveUserWarningButtonElement.focus(); |
+ |
+ // Move up the menu if it overlaps shelf. |
+ var maxHeight = Oobe.getMaxHeightBeforeShelfOverlapping( |
+ this.actionBoxMenu); |
+ var actualHeight = parseInt( |
+ window.getComputedStyle(this.actionBoxMenu).height); |
+ if (maxHeight < actualHeight) { |
+ this.actionBoxMenu.classList.add('menuMovedUp'); |
+ this.actionBoxAreaElement.classList.add('menuMovedUp'); |
+ } |
}, |
/** |