!48878 【BindSheet】修复bindSheet偶现键盘收起后依旧避让的问题

Merge pull request !48878 from 孙鑫炎/dev_bindAovidKeyboardHeightProb
This commit is contained in:
openharmony_ci 2024-11-20 07:52:28 +00:00 committed by Gitee
commit 944985b6ef
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -817,6 +817,9 @@ float SheetPresentationPattern::GetSheetHeightChange()
CHECK_NULL_RETURN(pipelineContext, .0f);
auto manager = pipelineContext->GetSafeAreaManager();
auto keyboardInsert = manager->GetKeyboardInset();
if (keyboardInsert.Length() == 0) {
return 0.f;
}
auto textFieldManager = DynamicCast<TextFieldManagerNG>(pipelineContext->GetTextFieldManager());
// inputH : Distance from input component's Caret to bottom of screen
// = caret's offset + caret's height + 24vp