mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 06:34:40 +03:00
webmail: when quoting text that switches unicode blocks (as highlighted), don't lose the switched text
by using a String object as the textarea child. instead of a regular js string that would be unicode-block-switch-highlighted, which would cause it to be split into parts, with odd or even parts added as span elements, which the textarea would then ignore.
This commit is contained in:
@ -711,6 +711,11 @@ const [dom, style, attr, prop] = (function () {
|
||||
if (typeof c === 'string') {
|
||||
formatText(e, c);
|
||||
}
|
||||
else if (c instanceof String) {
|
||||
// String is an escape-hatch for text that should not be formatted with
|
||||
// unicode-block-change-highlighting, e.g. for textarea values.
|
||||
e.appendChild(document.createTextNode('' + c));
|
||||
}
|
||||
else if (c instanceof Element) {
|
||||
e.appendChild(c);
|
||||
}
|
||||
|
Reference in New Issue
Block a user