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

Commit d89ce66

Browse files
cs1707CarterLi
authored andcommitted
Select: fix a bug that makes the browser jitter in zoom mode (ElemeFE#21197)
1 parent 60702ca commit d89ce66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/select/src/select.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,12 @@
668668
let inputChildNodes = this.$refs.reference.$el.childNodes;
669669
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
670670
const tags = this.$refs.tags;
671+
const tagsHeight = Math.round(tags.getBoundingClientRect().height);
671672
const sizeInMap = this.initialInputHeight || 40;
672673
input.style.height = this.selected.length === 0
673674
? sizeInMap + 'px'
674675
: Math.max(
675-
tags ? (tags.clientHeight + (tags.clientHeight > sizeInMap ? 6 : 0)) : 0,
676+
tags ? (tagsHeight + (tagsHeight > sizeInMap ? 6 : 0)) : 0,
676677
sizeInMap
677678
) + 'px';
678679
if (this.visible && this.emptyText !== false) {

0 commit comments

Comments
 (0)