@@ -884,23 +884,12 @@ function MenuItem({
884884 isCompact && styles . optionRowCompact ,
885885 isCompactPopoverItem && ( description ? styles . compactPopoverMenuItemBase : styles . compactPopoverMenuItem ) ,
886886 ! shouldRemoveBackground &&
887- // Nav rows (role=tab) skip the pressed background so a press keeps the hover/selected color and only dims via opacity
888- StyleUtils . getButtonBackgroundColorStyle (
889- getButtonState ( focused || isHovered , role === CONST . ROLE . TAB ? false : pressed , success , disabled , interactive ) ,
890- true ,
891- ) ,
887+ StyleUtils . getButtonBackgroundColorStyle ( getButtonState ( focused || isHovered , pressed , success , disabled , interactive ) , true ) ,
892888 ...( Array . isArray ( wrapperStyle ) ? wrapperStyle : [ wrapperStyle ] ) ,
893889 shouldGreyOutWhenDisabled && disabled && styles . buttonOpacityDisabled ,
894- // Nav rows (role=tab) hold the hover color through a press (dimmed via opacity); other rows drop it on press
895- isHovered &&
896- interactive &&
897- ! focused &&
898- ! shouldRemoveBackground &&
899- ! shouldRemoveHoverBackground &&
900- ( role === CONST . ROLE . TAB || ! pressed ) &&
901- styles . hoveredComponentBG ,
902- // Nav rows (role=tab) use the product300 selected color, held through a press
903- role === CONST . ROLE . TAB && focused && ! shouldRemoveBackground && StyleUtils . getBackgroundColorStyle ( theme . navItemSelectedBG ) ,
890+ isHovered && interactive && ! focused && ! pressed && ! shouldRemoveBackground && ! shouldRemoveHoverBackground && styles . hoveredComponentBG ,
891+ // Nav rows (role=tab) use product300 for the selected state
892+ role === CONST . ROLE . TAB && focused && ! pressed && ! shouldRemoveBackground && StyleUtils . getBackgroundColorStyle ( theme . navItemSelectedBG ) ,
904893 ] as StyleProp < ViewStyle >
905894 }
906895 disabledStyle = { shouldUseDefaultCursorWhenDisabled && [ styles . cursorDefault ] }
0 commit comments