Comfy-Org / Comfy-Org/ComfyUI_frontend

Add Space-key coverage for focused button and contenteditable controls

Open
#15,168 1 comment 1 reaction 1 assignee Claimed by @DrJKL View on GitHub
area:testing
Dominant language
TypeScript
Stars
2k
Forks
704
Avg merge
1d 8h
Merged PRs (30d)
512

Description

## Summary

Add browser-test coverage for focused buttons and contenteditable elements during
Space-key input while a Vue node drag is active.

## Rationale

`forwardSpaceKeyEvent` in `src/components/graph/GraphCanvas.vue` has dedicated
exclusions for `HTMLButtonElement` and `HTMLElement.isContentEditable`.
The current tests cover text inputs and native selects, but they do not execute
these two exclusions.

## Affected areas

- `browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts`
- `src/components/graph/GraphCanvas.vue` (`forwardSpaceKeyEvent` behavior)

## Required changes

Add focused-control tests near the existing Space-key panning tests. Each test
must hold Space while the relevant control has focus and verify that canvas
panning does not start.

Cover these controls:

1. A focused native button.
2. A focused contenteditable element.

## Acceptance criteria

- The button test verifies that `canvasOps.isReadOnly()` remains `false` while
Space is held.
- The contenteditable test verifies that `canvasOps.isReadOnly()` remains
`false` while Space is held.
- The tests use the browser-test conventions for this repository.
- The tests do not use `any` or `as any`.

## Backlinks

- Pull request: https://github.com/Comfy-Org/ComfyUI_frontend/pull/12943
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/12943#discussion_r3771416809
- Requested by: @DrJKL

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.