mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
!46974 修复第一次点击输入框显示单手柄的问题
Merge pull request !46974 from LuckClover/FirstShowHandle
This commit is contained in:
commit
e7538345d1
@ -1327,6 +1327,7 @@ void TextFieldPattern::HandleBlurEvent()
|
||||
}
|
||||
ReportEvent();
|
||||
ScheduleDisappearDelayTask();
|
||||
focusReason_ = RequestFocusReason::SYSTEM;
|
||||
}
|
||||
|
||||
void TextFieldPattern::ModifyInnerStateInBlurEvent()
|
||||
@ -2349,6 +2350,9 @@ void TextFieldPattern::HandleClickEvent(GestureEvent& info)
|
||||
StopTwinkling();
|
||||
return;
|
||||
}
|
||||
} else if (focusReason_ == RequestFocusReason::SYSTEM) {
|
||||
firstGetFocus = true;
|
||||
focusReason_ = RequestFocusReason::CLICK;
|
||||
}
|
||||
if (IsMouseOverScrollBar(info) && hasMousePressed_) {
|
||||
Point point(info.GetLocalLocation().GetX(), info.GetLocalLocation().GetY());
|
||||
@ -2721,6 +2725,9 @@ void TextFieldPattern::OnCursorTwinkling()
|
||||
host->MarkDirtyNode(PROPERTY_UPDATE_RENDER);
|
||||
}
|
||||
ScheduleCursorTwinkling();
|
||||
if (focusReason_ == RequestFocusReason::SYSTEM) {
|
||||
focusReason_ = RequestFocusReason::UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
void TextFieldPattern::StopTwinkling()
|
||||
|
@ -158,6 +158,7 @@ enum class RequestFocusReason {
|
||||
AUTO_FILL,
|
||||
CLEAN_NODE,
|
||||
MOUSE,
|
||||
SYSTEM
|
||||
};
|
||||
|
||||
|
||||
@ -1988,6 +1989,7 @@ private:
|
||||
WeakPtr<FrameNode> firstAutoFillContainerNode_;
|
||||
float lastCaretPos_ = 0.0f;
|
||||
std::optional<float> maxFontSizeScale_;
|
||||
RequestFocusReason focusReason_ = RequestFocusReason::SYSTEM;
|
||||
};
|
||||
} // namespace OHOS::Ace::NG
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user