Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit d343363

Browse files
Splaktarjelbourn
authored andcommitted
fix(autocomplete): updateSize incorrectly sets the size to zero (#11500)
this can break the ability to show the dropdown on focus Fixes #10834
1 parent 4e8bef8 commit d343363

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/virtualRepeat/virtual-repeater.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,14 @@ VirtualRepeatContainerController.prototype.updateSize = function() {
223223
// If the original size is already determined, we can skip the update.
224224
if (this.originalSize) return;
225225

226-
this.size = this.isHorizontal()
226+
var size = this.isHorizontal()
227227
? this.$element[0].clientWidth
228228
: this.$element[0].clientHeight;
229229

230+
if (size) {
231+
this.setSize_(size);
232+
}
233+
230234
// Recheck the scroll position after updating the size. This resolves
231235
// problems that can result if the scroll position was measured while the
232236
// element was display: none or detached from the document.

0 commit comments

Comments
 (0)