Fix fake search box action button 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 fake search box action button focus outline disappearing on hover

Previously, fake_search_box_action_button_background.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 action 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: I5953c09cb5c7ede5282b51a0975d2ab3be51048b

Change diff


Change information

Files:
  • M components/browser_ui/widget/android/java/res/drawable/fake_search_box_action_button_background.xml
Change size: M
Delta: 1 file changed, 39 insertions(+), 30 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: I5953c09cb5c7ede5282b51a0975d2ab3be51048b
Gerrit-Change-Number: 7622836
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