mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:54: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:
@ -1427,7 +1427,9 @@ const compose = (opts: ComposeOptions) => {
|
||||
),
|
||||
),
|
||||
body=dom.textarea(dom._class('mono'), attr.rows('15'), style({width: '100%'}),
|
||||
opts.body || '',
|
||||
// Explicit string object so it doesn't get the highlight-unicode-block-changes
|
||||
// treatment, which would cause characters to disappear.
|
||||
new String(opts.body || ''),
|
||||
opts.body && !opts.isForward && !opts.body.startsWith('\n\n') ? prop({selectionStart: opts.body.length, selectionEnd: opts.body.length}) : [],
|
||||
function keyup(e: KeyboardEvent) {
|
||||
if (e.key === 'Enter') {
|
||||
|
Reference in New Issue
Block a user