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

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

Issue 2260653002: Pin keyboard works with virtual keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed closure compilation. Created 4 years, 4 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 198888fab8786fbf496e4d6769d9fedd55c0519a..b2952eb505d86c57404cfdbc71a1da3564469b7b 100644
--- a/ui/login/account_picker/screen_account_picker.js
+++ b/ui/login/account_picker/screen_account_picker.js
@@ -180,18 +180,35 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
// We want bubble's arrow to point to the first letter of input.
/** @const */ var BUBBLE_OFFSET = 7;
/** @const */ var BUBBLE_PADDING = 4;
- $('bubble').showContentForElement(activatedPod.mainInput,
- cr.ui.Bubble.Attachment.BOTTOM,
- error,
- BUBBLE_OFFSET, BUBBLE_PADDING);
+
+ // We want the bubble to point to where the input is after it is done
+ // tranisitioning.
+ var showBottomCallback = function() {
+ activatedPod.removeEventListener("webkitTransitionEnd",
+ showBottomCallback);
+ $('bubble').showContentForElement(activatedPod.mainInput,
+ cr.ui.Bubble.Attachment.BOTTOM,
+ error,
+ BUBBLE_OFFSET, BUBBLE_PADDING);
+ };
+ activatedPod.addEventListener("webkitTransitionEnd",
+ showBottomCallback);
+ ensureTransitionEndEvent(activatedPod);
+
// 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);
+ var showTopCallback = function() {
+ activatedPod.removeEventListener("webkitTransitionEnd",
+ showTopCallback);
+ $('bubble').showContentForElement(activatedPod.mainInput,
+ cr.ui.Bubble.Attachment.TOP,
+ error,
+ BUBBLE_OFFSET, BUBBLE_PADDING);
+ };
+ activatedPod.addEventListener("webkitTransitionEnd", showTopCallback);
+ ensureTransitionEndEvent(activatedPod);
}
}
},
@@ -355,11 +372,11 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
},
/**
- * Hides the PIN keyboard if it's active.
+ * Removes the PIN keyboard so the user can no longer enter a PIN.
* @param {!user} user The user who can no longer enter a PIN.
*/
disablePinKeyboardForUser: function(user) {
- $('pod-row').setPinVisibility(user, false);
+ $('pod-row').removePinKeyboard(user);
},
/**

Powered by Google App Engine
This is Rietveld 408576698