diff --git a/frameworks/core/components_ng/event/focus_hub.cpp b/frameworks/core/components_ng/event/focus_hub.cpp index 996bff74c6806d72b2e5610f4b2367cb52fce7cd..3d3ee81ca9478cb809edac0d536315afae193bf6 100644 --- a/frameworks/core/components_ng/event/focus_hub.cpp +++ b/frameworks/core/components_ng/event/focus_hub.cpp @@ -1283,9 +1283,11 @@ bool FocusHub::PaintFocusState(bool isNeedStateStyles) return false; } - if (isNeedStateStyles && HasFocusStateStyle()) { - // do focus state style. - CheckFocusStateStyle(true); + if (HasFocusStateStyle()) { + if (isNeedStateStyles) { + // do focus state style. + CheckFocusStateStyle(true); + } return true; }