From dd197924ace7969cdeb362cafb1c37ec76046e48 Mon Sep 17 00:00:00 2001 From: Michael Prentice Date: Thu, 1 Nov 2018 15:55:15 -0400 Subject: [PATCH] fix(autocomplete): updateSize incorrectly sets the size to zero this can break the ability to show the dropdown on focus Fixes #10834 --- src/components/virtualRepeat/virtual-repeater.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/virtualRepeat/virtual-repeater.js b/src/components/virtualRepeat/virtual-repeater.js index ad3c334ed8..47d19ec0c1 100644 --- a/src/components/virtualRepeat/virtual-repeater.js +++ b/src/components/virtualRepeat/virtual-repeater.js @@ -223,10 +223,14 @@ VirtualRepeatContainerController.prototype.updateSize = function() { // If the original size is already determined, we can skip the update. if (this.originalSize) return; - this.size = this.isHorizontal() + var size = this.isHorizontal() ? this.$element[0].clientWidth : this.$element[0].clientHeight; + if (size) { + this.setSize_(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.