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

Unified Diff: chrome/browser/resources/vr_shell/vr_shell_ui.js

Issue 2670833005: Improve VR omnibox styling and function (Closed)
Patch Set: Fix closure compiler failure. Yay closure compiler. Created 3 years, 10 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/vr_shell/vr_shell_ui.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/vr_shell/vr_shell_ui.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.js b/chrome/browser/resources/vr_shell/vr_shell_ui.js
index 3cb3d389b47e3975591d6762a006bf1bf33200af..f342bf15a43984feb577180153553d24af520e0e 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js
@@ -220,6 +220,9 @@ var vrShellUi = (function() {
let update = new api.UiElementUpdate();
update.setVisible(false);
+ update.setSize(0.5, 0.2);
+ update.setTranslation(0, -2, -1);
+ update.setRotation(1, 0, 0, -0.8);
ui.updateElement(this.uiElement.uiElementId, update);
}
@@ -506,6 +509,7 @@ var vrShellUi = (function() {
// Watch for the enter key to trigger navigation.
this.inputField.addEventListener('keypress', function(e) {
if (e.keyCode == 13) {
+ this.setSuggestions([]);
api.doAction(
// TODO(crbug.com/683344): Properly choose prefix.
api.Action.LOAD_URL, {'url': 'http://' + e.target.value});
@@ -518,15 +522,17 @@ var vrShellUi = (function() {
});
// Clicking on suggestions triggers navigation.
- let elements = root.querySelectorAll('.omnibox-suggestion');
+ let elements = root.querySelectorAll('.suggestion');
this.maxSuggestions = elements.length;
for (var i = 0; i < elements.length; i++) {
elements[i].addEventListener('click', function(index, e) {
if (e.target.url) {
api.doAction(api.Action.LOAD_URL, {'url': e.target.url});
+ this.setSuggestions([]);
}
}.bind(this, i));
}
+
}
setEnabled(enabled) {
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698