fix:composing input not save history
This commit is contained in:
@@ -17,8 +17,9 @@ export function input(data: string, host: CanvasEvent) {
|
|||||||
// 忽略选区部分在控件的输入
|
// 忽略选区部分在控件的输入
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const isComposing = host.isComposing
|
||||||
// 移除合成输入
|
// 移除合成输入
|
||||||
if (!host.isComposing) {
|
if (!isComposing) {
|
||||||
const cursor = draw.getCursor()
|
const cursor = draw.getCursor()
|
||||||
cursor.clearAgentDomValue()
|
cursor.clearAgentDomValue()
|
||||||
} else {
|
} else {
|
||||||
@@ -59,7 +60,7 @@ export function input(data: string, host: CanvasEvent) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (host.isComposing) {
|
if (isComposing) {
|
||||||
newElement.underline = true
|
newElement.underline = true
|
||||||
}
|
}
|
||||||
return newElement
|
return newElement
|
||||||
@@ -81,9 +82,10 @@ export function input(data: string, host: CanvasEvent) {
|
|||||||
}
|
}
|
||||||
rangeManager.setRange(curIndex, curIndex)
|
rangeManager.setRange(curIndex, curIndex)
|
||||||
draw.render({
|
draw.render({
|
||||||
curIndex
|
curIndex,
|
||||||
|
isSubmitHistory: !isComposing
|
||||||
})
|
})
|
||||||
if (host.isComposing) {
|
if (isComposing) {
|
||||||
host.compositionInfo = {
|
host.compositionInfo = {
|
||||||
elementList,
|
elementList,
|
||||||
value: text,
|
value: text,
|
||||||
|
|||||||
Reference in New Issue
Block a user