修复RichEditor系统键盘和自定义键盘切换问题,菜单不显示问题

Signed-off-by: 姚明 <yaoming14@huawei.com>
This commit is contained in:
姚明 2024-07-21 17:51:39 +08:00
parent 7ad8e26f49
commit 3a6b9159dd
3 changed files with 7 additions and 1 deletions

View File

@ -6222,6 +6222,8 @@ void RichEditorPattern::CopySelectionMenuParams(SelectOverlayInfo& selectInfo, T
auto selectType = selectedType_.value_or(TextSpanType::NONE);
std::shared_ptr<SelectionMenuParams> menuParams = nullptr;
menuParams = GetMenuParams(selectType, responseType);
TAG_LOGI(AceLogTag::ACE_RICH_TEXT, "textSpanType = %{public}d , responseType = %{public}d", selectType,
responseType);
if (menuParams == nullptr) {
return;
}

View File

@ -351,7 +351,9 @@ public:
void NotifyKeyboardClosed() override
{
TAG_LOGI(AceLogTag::ACE_RICH_TEXT, "KeyboardClosed");
FocusHub::LostFocusToViewRoot();
if (!isCustomKeyboardAttached_) {
FocusHub::LostFocusToViewRoot();
}
}
void ClearOperationRecords();
void ClearRedoOperationRecords();

View File

@ -809,6 +809,8 @@ void BaseTextSelectOverlay::OnAncestorNodeChanged(FrameNodeChangeInfoFlag flag)
isSwitchToEmbed = isSwitchToEmbed && (!IsAncestorNodeEndScroll(flag) || HasUnsupportedTransform());
if (isStartScroll || isStartAnimation || isTransformChanged || isStartTransition) {
HideMenu(true);
} else if (IsAncestorNodeEndScroll(flag)) {
ShowMenu();
}
auto pipeline = PipelineContext::GetCurrentContextSafely();
CHECK_NULL_VOID(pipeline);