Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

va-text-input: fix bug where focus was hiding prefix/suffix icons#2078

Merged
powellkerry merged 6 commits into
mainfrom
5346-input-focus-prefix-suffix
Apr 22, 2026
Merged

va-text-input: fix bug where focus was hiding prefix/suffix icons#2078
powellkerry merged 6 commits into
mainfrom
5346-input-focus-prefix-suffix

Conversation

@powellkerry

@powellkerry powellkerry commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Chromatic

https://5346-input-focus-prefix-suffix--65a6e2ed2314f7b8f98609d8.chromatic.com

Summary

Fixed bug where prefix and suffix icons were being hidden when the text input was focused

Description

In mixins/focusable.scss, inputs are given a z-index of 2 when they are focused. This caused the prefix and suffix icons in va-text-input to be hidden when the field was focussed. This change moves that z-index to va-subnav.

Related tickets and links

Closes 5346

Screenshots

Before:
Screenshot 2026-04-21 at 8 19 06 AM

After:
Screenshot 2026-04-21 at 8 17 08 AM

Testing and review

Provide any testing instructions or review steps as needed.

Approvals

See the QA Checklists section below for suggested approvals. Use your best judgment if additional reviews are needed. When in doubt, request a review.

Approval groups

Add approval groups to the PR as needed:

QA checklists

Use the QA checklists below as guides, not rules. Not all checklists will apply to every PR but there could be some overlap.

In all scenarios, changes should be fully tested by the author and verified by the reviewer(s); functionality, responsiveness, etc.

✨ New Component Added
  • The PR has the minor label
  • The component matches the Figma designs.
  • All properties, custom events, and utility functions have e2e and/or unit tests
  • A new Storybook page has been added for the component
  • Tested in all VA breakpoints.
  • Chromatic UI Tests have run and snapshot changes have been accepted by the design reviewer
  • Tested in vets-website using Verdaccio
  • Engineering has approved the PR
  • Design has approved the PR
  • Accessibility has approved the PR
🌱 New Component Variation Added
  • The PR has the minor label
  • The variation matches its Figma design.
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • A new story has been added to the component's existing Storybook page
  • Any Chromatic UI snapshot changes have been accepted by a design reviewer
  • Tested in vets-website using Verdaccio
  • Engineering has approved the PR
  • Design has approved the PR
🐞 Component Fix
  • The PR has the patch label
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any markup changes are evaluated for impact on vets-website.
    • Will any vets-website tests fail from the change?
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
♿️ Component Fix - Accessibility
  • The PR has the patch label
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
  • Accessibility has approved the PR
🚨 Component Fix - Breaking API Change
  • The PR has the major label
  • vets-website and content-build have been evaluated to determine the impact of the breaking change
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Tested in vets-website using Verdaccio
  • Engineering has approved the PR
🔧 Component Update - Non-Breaking API Change
  • The PR has the minor label
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
📖 Storybook Update
  • The PR has the ignore-for-release label
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
🎨 CSS-Library Update
  • The PR has the css-library label
  • vets-website and content-build have been checked to determine the impact of any breaking changes
  • Engineering has approved the PR

@powellkerry powellkerry requested a review from a team as a code owner April 21, 2026 14:19
@powellkerry powellkerry added the patch Patch change in semantic versioning label Apr 21, 2026

@RyanMunsch RyanMunsch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question

Probably a better question for @jeana-adhoc or @amyleadem, but should clicking the icon set focus on the input element?

@RyanMunsch

Copy link
Copy Markdown
Contributor

Based on my testing, the icon issue is resolved by the z-index updates. I just have the follow-up question above.

@jamigibbs jamigibbs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a PR a few months ago that I think wanted to resolve this issue too but we tracked down the original problem to a global z-index mentioned here by Amy.

What I think we might actually want to do is add that global z-index directly to the va-sidenav component and remove the global reference. That will fix it here for va-text-input.

@powellkerry powellkerry requested a review from jamigibbs April 22, 2026 19:37
@powellkerry powellkerry merged commit 8a20df6 into main Apr 22, 2026
9 checks passed
@powellkerry powellkerry deleted the 5346-input-focus-prefix-suffix branch April 22, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Patch change in semantic versioning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text Input: Icons and prefix/suffix text disappears on focus

3 participants