Skip to content

fix: SW-2043 remove doubled inner shadow on input-group focus#142

Open
boramyi-ts wants to merge 1 commit into
mainfrom
SW-2043-input-group-focus-shadow
Open

fix: SW-2043 remove doubled inner shadow on input-group focus#142
boramyi-ts wants to merge 1 commit into
mainfrom
SW-2043-input-group-focus-shadow

Conversation

@boramyi-ts

@boramyi-ts boramyi-ts commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

SW-2043 — fixes a doubled focus shadow on the Input Group.

InputGroupInput / InputGroupTextarea wrap the base Input / Textarea, which carry focus-visible:shadow-focus. The wrapper suppressed the control's ring (focus-visible:ring-0) but not its shadow, so on keyboard focus the inner control rendered its own shadow-focus — offset from, and doubled with, the wrapper's has-[…]:shadow-focus. The result was a faint second shadow box around the inner field.

Fix

Add focus-visible:shadow-none to both InputGroupInput and InputGroupTextarea so only the wrapper shows the focus indicator.

src/components/ui/input-group.tsx
- focus-visible:ring-0 ...
+ focus-visible:ring-0 focus-visible:shadow-none ...

Before / after

Input group on keyboard focus — Before: wrapper shadow + the inner control's own shadow (doubled, offset). After: a single wrapper-level indicator.

SW-2043 input-group focus before/after

📄 Interactive: sw-2043-inner-shadow-before-after.html · download raw

Why no !important / tailwind-merge change

shadow-none beats shadow-focus by cascade in both class orders (verified directly: shadow-focus shadow-none and shadow-none shadow-focus both compute to none), so focus-visible:shadow-none deterministically cancels the inherited focus-visible:shadow-focus.

yarn lint + yarn typecheck pass.

🤖 Generated with Claude Code

InputGroupInput/InputGroupTextarea build on Input/Textarea, which carry
focus-visible:shadow-focus. The wrapper stripped the control's ring but
not its shadow, so on keyboard focus the inner control painted its own
shadow-focus offset from and doubled with the wrapper's. Add
focus-visible:shadow-none to the control so only the wrapper shows the
focus indicator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@boramyi-ts boramyi-ts requested review from a team as code owners June 18, 2026 17:46
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ts-lib-ui-kit-storybook Ready Ready Preview, Comment Jun 18, 2026 5:50pm

Request Review

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 94.74% (🎯 83%)
🟰 ±0%
20262 / 21385
🟢 Statements 94.74% (🎯 83%)
🟰 ±0%
20262 / 21385
🟢 Functions 93.59% (🎯 74%)
🟰 ±0%
906 / 968
🟢 Branches 88.74% (🎯 81%)
🟰 ±0%
3674 / 4140
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/ui/input-group.tsx 96.47%
🟰 ±0%
90%
🟰 ±0%
87.5%
🟰 ±0%
96.47%
🟰 ±0%
56-60
Generated in workflow #794 for commit 2a04e66 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants