New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix amp-sidebar toolbar issue with chrome #12204
Conversation
…g time to be ready
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Thanks for the fix @omar-a-toma |
toolbar.onLayoutChange(() => this.onToolbarOpen_()); | ||
this.getAmpDoc().whenReady().then(() => { | ||
// Check our toolbars for changes | ||
this.toolbars_.forEach(toolbar => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@camelburrito Can this move to buildCallback
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because at this point the toolbar had been built and this code attempts to inject it at the right place on the DOM when layout changes based on the viewport width + toolbar config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @camelburrito any changes you like to this?
I think it i would be better to add one small test to check if we are waiting for onready |
…g time to be ready (ampproject#12204)
closes #12205