mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-12-04 04:53:34 +00:00
!1442 [Bug]: 去重OnSelectionChange
Merge pull request !1442 from 赵凌岚/master
This commit is contained in:
commit
4d1abf7617
@ -478,7 +478,11 @@ int32_t InputMethodAbility::InvokeStartInputCallback(const TextTotalConfig &text
|
|||||||
kdListener_->OnCursorUpdate(textConfig.cursorInfo.left, textConfig.cursorInfo.top,
|
kdListener_->OnCursorUpdate(textConfig.cursorInfo.left, textConfig.cursorInfo.top,
|
||||||
textConfig.cursorInfo.height);
|
textConfig.cursorInfo.height);
|
||||||
}
|
}
|
||||||
if (textConfig.textSelection.newBegin != INVALID_SELECTION_VALUE) {
|
if (textConfig.textSelection.newBegin == INVALID_SELECTION_VALUE
|
||||||
|
|| (textConfig.textSelection.newBegin == textConfig.textSelection.oldBegin
|
||||||
|
&& textConfig.textSelection.newEnd == textConfig.textSelection.oldEnd)) {
|
||||||
|
IMSA_HILOGD("invalid selection or no selection change");
|
||||||
|
} else {
|
||||||
kdListener_->OnSelectionChange(textConfig.textSelection.oldBegin, textConfig.textSelection.oldEnd,
|
kdListener_->OnSelectionChange(textConfig.textSelection.oldBegin, textConfig.textSelection.oldEnd,
|
||||||
textConfig.textSelection.newBegin, textConfig.textSelection.newEnd);
|
textConfig.textSelection.newBegin, textConfig.textSelection.newEnd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user