Fix:优化开启原地编辑模式下且不使用富文本text编辑时输入框定位会抖动的问题
This commit is contained in:
parent
f71b47b215
commit
4332abce4d
@ -374,8 +374,8 @@ export default class TextEdit {
|
|||||||
this.textEditNode.style.minWidth =
|
this.textEditNode.style.minWidth =
|
||||||
rect.width + this.textNodePaddingX * 2 + 'px'
|
rect.width + this.textNodePaddingX * 2 + 'px'
|
||||||
this.textEditNode.style.minHeight = rect.height + 'px'
|
this.textEditNode.style.minHeight = rect.height + 'px'
|
||||||
this.textEditNode.style.left = rect.left + 'px'
|
this.textEditNode.style.left = Math.floor(rect.left) + 'px'
|
||||||
this.textEditNode.style.top = rect.top + 'px'
|
this.textEditNode.style.top = Math.floor(rect.top) + 'px'
|
||||||
this.textEditNode.style.display = 'block'
|
this.textEditNode.style.display = 'block'
|
||||||
this.textEditNode.style.maxWidth = textAutoWrapWidth * scale + 'px'
|
this.textEditNode.style.maxWidth = textAutoWrapWidth * scale + 'px'
|
||||||
if (isMultiLine) {
|
if (isMultiLine) {
|
||||||
@ -413,8 +413,8 @@ export default class TextEdit {
|
|||||||
rect.width + this.textNodePaddingX * 2 + 'px'
|
rect.width + this.textNodePaddingX * 2 + 'px'
|
||||||
this.textEditNode.style.minHeight =
|
this.textEditNode.style.minHeight =
|
||||||
rect.height + this.textNodePaddingY * 2 + 'px'
|
rect.height + this.textNodePaddingY * 2 + 'px'
|
||||||
this.textEditNode.style.left = rect.left + 'px'
|
this.textEditNode.style.left = Math.floor(rect.left) + 'px'
|
||||||
this.textEditNode.style.top = rect.top + 'px'
|
this.textEditNode.style.top = Math.floor(rect.top) + 'px'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取编辑区域的背景填充
|
// 获取编辑区域的背景填充
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user