Fix rounded list item focus outline disappearing on hover [chromium/src : main]

0 views
Skip to first unread message

Ben Chin (Gerrit)

unread,
12:23 AM (2 hours ago) 12:23 AM
to chromium...@chromium.org

Ben Chin has uploaded the change for review

Commit message

Fix rounded list item focus outline disappearing on hover

Previously, list_item_rounded_background_selector.xml used a single
StateListDrawable (<selector>) to manage all interaction states. Because
the state_hovered item was defined above the state_focused item,
hovering over an already-focused list item would cause the selector to
match the hovered state first, replacing the focus outline ring with the
solid hover background.

This CL fixes the issue by wrapping the selectors in a <layer-list>.
The solid background overlays (hovered, pressed) are now handled
independently on a lower layer, while the focus ring outline is
handled on a higher layer. This ensures the focus ring remains
visible even when the icon is simultaneously being hovered or pressed.
Bug: 487866187
Change-Id: I27ba1e94322251bb655b2c58b9cdd335235c7d67

Change diff


Change information

Files:
  • M components/browser_ui/widget/android/java/res/drawable/list_item_rounded_background_selector.xml
Change size: M
Delta: 1 file changed, 34 insertions(+), 26 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I27ba1e94322251bb655b2c58b9cdd335235c7d67
Gerrit-Change-Number: 7622837
Gerrit-PatchSet: 1
Gerrit-Owner: Ben Chin <lu...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages