Comfy-Org / Comfy-Org/ComfyUI

Add Escape key to close sidebar panels

Open
#13,342 1 comment 0 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Feature Idea

Currently, clicking a button in the side toolbar opens its corresponding sidebar panel, but pressing Escape does not close it. The only way to dismiss the panel is by clicking the toolbar button again or clicking elsewhere.

**Expected behavior:**
Pressing Escape while a sidebar panel is open should collapse/close it. This is standard UI/UX behavior, most applications with slide-out panels, drawers, and popover-style UI elements support Escape to dismiss (VS Code, Figma, browser DevTools, etc.).

**Current behavior:**
Pressing Escape does nothing when a sidebar panel is open.

**Why this matters:**
- Escape to dismiss is a widely established UI convention users expect without being taught
- Improves keyboard accessibility, users shouldn't need to reach for the mouse just to close a panel
- Especially useful when the panel was opened accidentally or the user is done with it and wants to reclaim canvas space quickly

### Existing Solutions

_No response_

### Other

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the sidebar panel open/close handling and the keyboard event entry point in the frontend. Reproduce the current behavior with a panel open, then verify that Escape collapses it without disrupting other interactions. Done means the behavior works consistently for open sidebar panels and is covered by the project's available UI checks.

Written by the indexing model from the issue text.

Assessment

Domain
accessibility, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.