autocomplete: suggestions don't show after $md-resize raised while something is selected
Actual Behavior:
What is the issue? *Suggestions don't show after clicking X or by clicking on input.What is the expected behavior?Suggestions should show after clicking X or by clicking on input.
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:https://codepen.io/anon/pen/Vzmyem (this is not changed basic demo from main angular material webpage)Details:Choose something from autocomplete. Then resize browser window. Then click X. After that suggestions will not be displayed like normally.
AngularJS Versions: *
AngularJS Version:1.5.7AngularJS Material Version:1.1.4
Additional Information:
Browser Type: *ChromeBrowser Version: *59.0.3071.115OS: *Windows
My fix which works, but I don't know if it is proper fix:
VirtualRepeatContainerController.prototype.updateSize = function() {
// If the original size is already determined, we can skip the update.
if (this.originalSize) return;
var size = this.isHorizontal()
? this.$element[0].clientWidth
: this.$element[0].clientHeight;
if (size) {
this.size = size;
}
// Recheck the scroll position after updating the size. This resolves
// problems that can result if the scroll position was measured while the
// element was display: none or detached from the document.
this.handleScroll_();
this.repeater && this.repeater.containerUpdated();
};
This is fix for this line: https://github.com/angular/material/blob/master/src/components/virtualRepeat/virtual-repeater.js#L225
Duplicate of https://github.com/angular/material/issues/10283
@Splaktar I know this is a duplicate of the other issue, but it does solve a valid bug in 3 lines of additional code. Consider merging to master?
@mjgerace there is nothing to merge as this is an issue and not a PR. It would be great if you could test this fix. If it is effective, can you please submit a PR with the fix and a unit test?
Reopening based on feedback in https://github.com/angular/material/issues/10283#issuecomment-434348823.