Skip to content

fix: prevent check/uncheck from hanging on hidden checkbox elements#665

Open
juliobrasa wants to merge 1 commit intovercel-labs:mainfrom
juliobrasa:fix/check-uncheck-hidden-checkbox
Open

fix: prevent check/uncheck from hanging on hidden checkbox elements#665
juliobrasa wants to merge 1 commit intovercel-labs:mainfrom
juliobrasa:fix/check-uncheck-hidden-checkbox

Conversation

@juliobrasa
Copy link

Summary

UI frameworks (Element UI, Ant Design, Vuetify) hide native <input type="checkbox"> with opacity: 0 and zero dimensions. Playwright's check() waits indefinitely for actionability — a condition that never satisfies for hidden inputs.

Fix

Attempt check()/uncheck() with a 5-second timeout first. If it fails due to actionability, retry with force: true to bypass visibility checks. This handles both standard visible checkboxes and framework-hidden ones without changing behavior for normal cases.

Test plan

  • TypeScript compiles without errors
  • check works on visible checkboxes (normal path)
  • check works on hidden native checkboxes (force fallback)
  • check still reports errors for non-existent selectors

Closes #335

🤖 Generated with Claude Code

UI frameworks (Element UI, Ant Design, Vuetify) hide native checkbox
inputs with `opacity: 0` and zero dimensions. Playwright's `check()`
waits indefinitely for the element to become "actionable" — a condition
that never satisfies for hidden inputs.

Fix: attempt `check()`/`uncheck()` with a 5-second timeout first. If
it fails (due to visibility/actionability), retry with `force: true`
to bypass actionability checks. This handles both standard visible
checkboxes and framework-hidden ones.

Closes vercel-labs#335

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Contributor

vercel bot commented Mar 6, 2026

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

Bug: check/uncheck commands hang on hidden native checkbox elements

1 participant