Commit a4ecd5b7 authored by calamity's avatar calamity Committed by Commit bot

[MD History] Make first URL on Synced Device page instead of menu button.

BUG=653398
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2618633002
Cr-Commit-Position: refs/heads/master@{#441884}
parent 34e9fa07
...@@ -190,7 +190,7 @@ Polymer({ ...@@ -190,7 +190,7 @@ Polymer({
.forEach(function(row) { .forEach(function(row) {
this.focusGrid_.addRow(row); this.focusGrid_.addRow(row);
}.bind(this)); }.bind(this));
this.focusGrid_.ensureRowActive(); this.focusGrid_.ensureRowActive(1);
}); });
}, },
......
...@@ -146,8 +146,11 @@ cr.define('cr.ui', function() { ...@@ -146,8 +146,11 @@ cr.define('cr.ui', function() {
/** /**
* Makes sure that at least one row is active. Should be called once, after * Makes sure that at least one row is active. Should be called once, after
* adding all rows to FocusGrid. * adding all rows to FocusGrid.
* @param {number=} preferredRow The row to select if no other row is
* active. Selects the first item if this is beyond the range of the
* grid.
*/ */
ensureRowActive: function() { ensureRowActive: function(preferredRow) {
if (this.rows.length == 0) if (this.rows.length == 0)
return; return;
...@@ -156,7 +159,7 @@ cr.define('cr.ui', function() { ...@@ -156,7 +159,7 @@ cr.define('cr.ui', function() {
return; return;
} }
this.rows[0].makeActive(true); (this.rows[preferredRow || 0] || this.rows[0]).makeActive(true);
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment