| Index: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| index 2f9283d32d4a7802dfe280d4b4d84c9fde6e6570..f61b2ed6b874889275af2f10c317cfd4ef8de604 100644
|
| --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| @@ -359,29 +359,27 @@ Polymer({
|
|
|
| ready: function() {
|
| this.elementReadyTimeMs_ = performance.now();
|
| -
|
| - // If this is not on a Mac platform, remove the placeholder. See
|
| - // onFocus_() for more details. ready() is only called once, so no need
|
| - // to check if the placeholder exist before removing.
|
| - if (!cr.isMac)
|
| - this.$$('#focus-placeholder').remove();
|
| -
|
| - document.addEventListener('keydown', this.onKeydown_.bind(this), true);
|
| - this.setSearchFocusHandlers_();
|
| this.showSinkList_();
|
| - },
|
| -
|
| - attached: function() {
|
| - this.updateElementPositioning_();
|
|
|
| - // Turn off the spinner after 3 seconds, then report the current number of
|
| - // sinks.
|
| - this.async(function() {
|
| - this.justOpened_ = false;
|
| - this.fire('report-sink-count', {
|
| - sinkCount: this.allSinks.length,
|
| - });
|
| - }, 3000 /* 3 seconds */);
|
| + Polymer.RenderStatus.afterNextRender(this, function() {
|
| + // If this is not on a Mac platform, remove the placeholder. See
|
| + // onFocus_() for more details. ready() is only called once, so no need
|
| + // to check if the placeholder exist before removing.
|
| + if (!cr.isMac)
|
| + this.$$('#focus-placeholder').remove();
|
| +
|
| + document.addEventListener('keydown', this.onKeydown_.bind(this), true);
|
| + this.setSearchFocusHandlers_();
|
| +
|
| + // Turn off the spinner after 3 seconds, then report the current number of
|
| + // sinks.
|
| + this.async(function() {
|
| + this.justOpened_ = false;
|
| + this.fire('report-sink-count', {
|
| + sinkCount: this.allSinks.length,
|
| + });
|
| + }, 3000 /* 3 seconds */);
|
| + });
|
| },
|
|
|
| /**
|
|
|