Fix search box icon focus outline disappearing on hover [chromium/src : main]

0 views
Skip to first unread message

Ben Chin (Gerrit)

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

Ben Chin has uploaded the change for review

Commit message

Fix search box icon focus outline disappearing on hover

Previously, search_box_icon_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 search box button 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: Ic8b5212e3079381d7d1641b814ba9229d62a368f

Change diff


Change information

Files:
  • M components/browser_ui/widget/android/java/res/drawable/search_box_icon_background_selector.xml
Change size: M
Delta: 1 file changed, 34 insertions(+), 27 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: Ic8b5212e3079381d7d1641b814ba9229d62a368f
Gerrit-Change-Number: 7622838
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