补充键盘避让向uxt传递

Signed-off-by: Shi Bofan <shibofan1@huawei.com>
This commit is contained in:
Shi Bofan 2024-09-23 19:17:29 +08:00
parent cb2fd616e3
commit 10c6bfa272

View File

@ -2520,9 +2520,11 @@ void UIContentImpl::UpdateViewportConfigWithAnimation(const ViewportConfig& conf
AceViewportConfig aceViewportConfig(modifyConfig, reason, rsTransaction);
bool isReasonRotationOrDPI = (reason == OHOS::Rosen::WindowSizeChangeReason::ROTATION ||
reason == OHOS::Rosen::WindowSizeChangeReason::UPDATE_DPI_SYNC);
bool isAvoidAreaDoChanged = !updatingInsets.empty() ||
avoidAreas.find(OHOS::Rosen::AvoidAreaType::TYPE_KEYBOARD) != avoidAreas.end();
if (container->IsUseStageModel() && isReasonRotationOrDPI) {
viewportConfigMgr_->UpdateConfigSync(aceViewportConfig, std::move(task));
} else if (rsTransaction != nullptr || !updatingInsets.empty()) {
} else if (rsTransaction != nullptr || isAvoidAreaDoChanged) {
// When rsTransaction is not nullptr, the task contains animation. It shouldn't be cancled.
// When avoidAreas need updating, the task shouldn't be cancelled.
taskExecutor->PostTask(std::move(task), TaskExecutor::TaskType::PLATFORM, "ArkUIUpdateViewportConfig");