Fix <textarea> overlay
This commit is contained in:
parent
2dd06fcef4
commit
61401cb3c0
19
service.js
19
service.js
@ -2402,21 +2402,32 @@ class BesTAService extends BesPlainTextService {
|
|||||||
const scrollLeft = window.scrollX || document.documentElement.scrollLeft
|
const scrollLeft = window.scrollX || document.documentElement.scrollLeft
|
||||||
const styles = window.getComputedStyle(hostElement)
|
const styles = window.getComputedStyle(hostElement)
|
||||||
|
|
||||||
textElement.style.zIndex = hostElement.style.zIndex - 1
|
textElement.style.display = styles.display
|
||||||
textElement.style.font = styles.font
|
textElement.style.font = styles.font
|
||||||
textElement.style.lineHeight = styles.lineHeight
|
textElement.style.lineHeight = styles.lineHeight
|
||||||
textElement.style.whiteSpace = styles.whiteSpace
|
textElement.style.whiteSpace = styles.whiteSpace
|
||||||
textElement.style.whiteSpaceCollapse = styles.whiteSpaceCollapse
|
textElement.style.whiteSpaceCollapse = styles.whiteSpaceCollapse
|
||||||
textElement.style.hyphens = styles.hyphens
|
textElement.style.hyphens = styles.hyphens
|
||||||
textElement.style.boxSizing = styles.boxSizing
|
|
||||||
textElement.style.scrollBehavior = styles.scrollBehavior
|
textElement.style.scrollBehavior = styles.scrollBehavior
|
||||||
|
textElement.style.overflow = styles.overflow
|
||||||
textElement.style.border = styles.border
|
textElement.style.border = styles.border
|
||||||
textElement.style.borderRadius = styles.borderRadius
|
textElement.style.borderRadius = styles.borderRadius
|
||||||
|
textElement.style.borderColor = 'transparent'
|
||||||
textElement.style.padding = styles.padding
|
textElement.style.padding = styles.padding
|
||||||
textElement.style.left = `${rect.left + scrollLeft}px`
|
textElement.style.left = `${rect.left + scrollLeft}px`
|
||||||
textElement.style.top = `${rect.top + scrollTop}px`
|
textElement.style.top = `${rect.top + scrollTop}px`
|
||||||
textElement.style.width = styles.width
|
textElement.style.width = `${
|
||||||
textElement.style.height = styles.height
|
rect.width -
|
||||||
|
parseFloat(styles.borderLeftWidth) -
|
||||||
|
parseFloat(styles.paddingLeft) -
|
||||||
|
parseFloat(styles.paddingRight) -
|
||||||
|
parseFloat(styles.borderRightWidth)
|
||||||
|
}px`
|
||||||
|
textElement.style.height = `${rect.height -
|
||||||
|
parseFloat(styles.borderTopWidth) -
|
||||||
|
parseFloat(styles.paddingTop) -
|
||||||
|
parseFloat(styles.paddingBottom) -
|
||||||
|
parseFloat(styles.borderBottomWidth)}px`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,9 +50,9 @@
|
|||||||
|
|
||||||
.bes-text-panel {
|
.bes-text-panel {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
background: none;
|
background: none;
|
||||||
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user