Skip to content

fix(triggers): show the remove button on touch screens and keyboard focus - #1701

Merged
viethung0o0 merged 1 commit into
mainfrom
fix/trigger-remove-button-touch
Nov 11, 2026
Merged

viethung0o0 merged 1 commit into
mainfrom
fix/trigger-remove-button-touch

Conversation

@viethung0o0

Copy link
Copy Markdown
Contributor

What changed

The X that removes a condition or an action in the trigger editor (features/triggers/base-editor.tsx) is now also shown:

  • always on touch screens (pointer-coarse:block);
  • when focus is inside the card (group-focus-within:block).

On a mouse it still appears only on hover, as before.

Why

The button was hidden group-hover:block. Tailwind v4 applies hover: only under @media (hover: hover). When Chrome reports a touch device (a touch-screen laptop, a 2-in-1 in tablet mode, an attached pen tablet, some remote-desktop tools), that query is false. The button then never appears, so the user cannot remove a condition or an action. A keyboard user could not reach it either.

Validation

  • Browser, trigger edit page:
    • The generated CSS contains @media (pointer: coarse) { .pointer-coarse\:block { display: block } }.
    • With a mouse, the X is hidden until the card is hovered, then shown.
    • Focusing a control inside the card shows the X.
    • With the coarse-pointer rule applied, the X is shown without hover. Chrome cannot switch pointer: coarse from page script, so a real touch device was not used.
  • Pre-commit lint and typecheck: pass.

@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 11, 2026
@viethung0o0
viethung0o0 marked this pull request as ready for review November 11, 2026 09:23
@viethung0o0
viethung0o0 merged commit fe3d21b into main Nov 11, 2026
15 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants