Skip to content
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

paper-dialog-inner does not get md-content-overflow class unless img element present #807

Closed
rpkwv8 opened this issue Sep 6, 2017 · 1 comment

Comments

@rpkwv8
Copy link

rpkwv8 commented Sep 6, 2017

The contentOverflow classBinding is only assigned in the callback of img element load event. If I do not have an img element in my paper-dialog, md-content-overflow class is never assigned and the border styling separating scrollable content from the dialog actions is shown. Link below is to the lines responsible. Angular material determines overflow twice-- once in $$rAF and then again after images are loaded. Ember-paper should do the same.

imagesLoaded() {
let content = this.element.querySelector('md-dialog-content');
this.set('contentOverflow', content.scrollHeight > content.clientHeight);
},
didInsertElement() {
this._super(...arguments);
// content overflow might change depending on load of images inside dialog.
let images = this.$().find('img');
images.on(`load.${this.elementId}`, run.bind(this, this.imagesLoaded));
},

@miguelcobain
Copy link
Owner

This should be fixed on master. Thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants