<textarea>: Populate text panel content sooner
This makes the text panel contain true content and size earlier at the registration time.
This commit is contained in:
parent
6b1b46de55
commit
d246d07d7f
@ -2226,9 +2226,6 @@ class BesTAService extends BesPlainTextService {
|
||||
*/
|
||||
constructor(hostElement, eventSink) {
|
||||
super(hostElement, BesTAService.createTextElement(hostElement), eventSink)
|
||||
this.textElement.replaceChildren(
|
||||
document.createTextNode(this.hostElement.value)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2268,6 +2265,7 @@ class BesTAService extends BesPlainTextService {
|
||||
static createTextElement(hostElement) {
|
||||
const textElement = document.createElement('div')
|
||||
textElement.classList.add('bes-text-panel')
|
||||
textElement.replaceChildren(document.createTextNode(hostElement.value))
|
||||
BesTAService.setTextElementSize(hostElement, textElement)
|
||||
hostElement.parentNode.insertBefore(textElement, hostElement)
|
||||
return textElement
|
||||
|
Loading…
x
Reference in New Issue
Block a user