mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-12-03 12:30:46 +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,
|
||||
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,
|
||||
textConfig.textSelection.newBegin, textConfig.textSelection.newEnd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user