mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
补充键盘避让向uxt传递
Signed-off-by: Shi Bofan <shibofan1@huawei.com>
This commit is contained in:
parent
cb2fd616e3
commit
10c6bfa272
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user