mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 17:34:27 +02:00
Fix duplicated character when composing text (#234)
This commit is contained in:
@@ -6,6 +6,9 @@ export function singleLineExtensions(): Extension {
|
|||||||
(tr: Transaction): TransactionSpec | TransactionSpec[] => {
|
(tr: Transaction): TransactionSpec | TransactionSpec[] => {
|
||||||
if (!tr.isUserEvent('input')) return tr;
|
if (!tr.isUserEvent('input')) return tr;
|
||||||
|
|
||||||
|
// when composing text via IME, return
|
||||||
|
if (tr.isUserEvent('input.type.compose')) return tr;
|
||||||
|
|
||||||
const specs: TransactionSpec[] = [];
|
const specs: TransactionSpec[] = [];
|
||||||
tr.changes.iterChanges((_, toA, fromB, toB, inserted) => {
|
tr.changes.iterChanges((_, toA, fromB, toB, inserted) => {
|
||||||
let insert = '';
|
let insert = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user