@ -3278,9 +3278,11 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
{
if ( ( g . LastItemData . InFlags & ImGuiItemFlags_Disabled ) & & ! ( flags & ImGuiHoveredFlags_AllowWhenDisabled ) )
return false ;
return IsItemFocused ( ) ;
if ( ! IsItemFocused ( ) )
return false ;
}
else
{
// Test for bounding box overlap, as updated as ItemAdd()
ImGuiItemStatusFlags status_flags = g . LastItemData . StatusFlags ;
if ( ! ( status_flags & ImGuiItemStatusFlags_HoveredRect ) )
@ -3314,6 +3316,8 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
// When the window is collapsed (SkipItems==true) that last item will never be overwritten so we need to detect the case.
if ( g . LastItemData . ID = = window - > MoveId & & window - > WriteAccessed )
return false ;
}
return true ;
}