Open maczyt opened 4 years ago
Translation of this issue:
2.12.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36
2.6.10
Https://codepen.io/maczyt/pen/bGbOZKL
Click input, display popper, open the console, and you can see that the element class = "el-popper el-cascader__dropdown" to zindex has been increasing jitter
Without jitter, zindex does not increase
Jitter occurs, zindex increases
Cn: 我也遇到了这种情况; En: Me too.
需要修改node_modules/element-ui/lib/cascader.js下的源码: 源码中搜索: Object(resizeevent["addResizeListener"])(this.$el, this.updateStyle); 改为: if (this.filterable) { Object(resizeevent["addResizeListener"])(this.$el, this.updateStyle); } bug原因:源码更新机制问题造成不停更新样式,这里需要增加一个判断即可
2.13.2 still has this issue.
The css top
attribute is changing between 78px and 79px
the reason may be browser is zoomed as 96%, when zoomed 100%, it's no shake
2.15.1 版本还是有这个问题
It works well after add specific height to class, like below:
.el-input.el-input--small.el-input--suffix {
height: 33px;
}
this may works better
.el-input.el-input--small.el-input--suffix {
input {
min-height: 34px !important;
}
}
Element UI version
2.12.0
OS/Browsers version
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36
Vue version
2.6.10
Reproduction Link
https://codepen.io/maczyt/pen/bGbOZKL
Steps to reproduce
点击input,显示popper,打开控制台,可以看到元素class="el-popper el-cascader__dropdown"到zindex一直在递增抖动
What is Expected?
不发生抖动,zindex不发生递增
What is actually happening?
发生抖动,zindex发生递增