mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-19 14:43:36 -04:00
fix bug of focus
Signed-off-by: luoying_ace_admin <luoying19@huawei.com>
This commit is contained in:
@@ -1233,6 +1233,16 @@ void JSViewAbstract::JsEnabled(const JSCallbackInfo& info)
|
||||
|
||||
auto rootComponent = ViewStackProcessor::GetInstance()->GetRootComponent();
|
||||
rootComponent->SetDisabledStatus(!(info[0]->ToBoolean()));
|
||||
|
||||
if (!(info[0]->ToBoolean())) {
|
||||
auto focusComponent = ViewStackProcessor::GetInstance()->GetFocusableComponent();
|
||||
if (!focusComponent) {
|
||||
LOGE("The focusComponent is null");
|
||||
return;
|
||||
} else {
|
||||
focusComponent->SetFocusable(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JSViewAbstract::JsAspectRatio(const JSCallbackInfo& info)
|
||||
|
||||
Reference in New Issue
Block a user