Don't let Mockuper's shortcuts hijack undo and delete while typing in a field
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start in the global keydown handler in mockuper/js/modules/UIController.js (around lines 264-282), where Delete/Backspace already skip input and textarea targets. Add an isEditingText(target) helper using closest() for input, textarea, select and [contenteditable], then gate the delete, undo and redo branches on it. Make the Z and Y key checks case-insensitive with e.key.toLowerCase(). Done when Ctrl/Cmd+Z in a property field edits text, Ctrl/Cmd+Shift+Z redoes on the canvas, and Delete still removes the selected element when the canvas has focus.
Written by the indexing model from the issue text.
Description
Context
The global keydown handler in mockuper/js/modules/UIController.js (~lines 264-282) skips INPUT/TEXTAREA for Delete/Backspace, but not for Ctrl/Cmd+Z and Ctrl+Y / Ctrl+Shift+Z. Pressing Ctrl+Z while editing a property in the right panel calls preventDefault() and undoes a whole canvas change instead of the last text edit. The input check also misses SELECT and contentEditable elements.
What to do
- Add a helper
isEditingText(target)that returns true forinput,textarea,selectand[contenteditable](useclosest). - Skip all canvas shortcuts (delete, undo, redo) when it returns true.
- Make the undo/redo key check case-insensitive (
e.key.toLowerCase()), because with Shift helde.keyis"Z", so Ctrl/Cmd+Shift+Z redo never fires today (only Ctrl+Y works).
Acceptance criteria
- Ctrl/Cmd+Z inside a property input undoes text, not the canvas.
- Ctrl/Cmd+Shift+Z redoes on the canvas when focus isn't in a field.
- Delete/Backspace still removes the selected element when focus is on the canvas.
Files
mockuper/js/modules/UIController.js
Helpful links
Part of GSoC 2027 onboarding — see https://gsoc.alphaonelabs.com
- Dominant language
- HTML
- Stars
- 66
- Forks
- 181
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alphaonelabs/website
-
Rewrite the gsoc/ README for the current site and 2027Possibly taken @KanishJebaMathewM claimed this 1 day ago. Open2026-11 documentation good first issue gsoc-2027 project: gsoc
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
alphaonelabs/website#1154 · 1 comment ·
Maintainers usually reply within 1 day
-
Add unit tests for the virtual campus layout logicPossibly taken @KanishJebaMathewM claimed this 1 day ago. Open2026-11 good first issue gsoc-2027 project: virtual tests
Difficulty 2/5 Half a day Newbie friendliness 82/100
alphaonelabs/website#1150 · 1 comment ·
Maintainers usually reply within 1 day
-
Update BotLab's README and CONTRIBUTING for the monorepo and live sitePossibly taken @KanishJebaMathewM claimed this today. Open2026-11 documentation good first issue gsoc-2027 project: botlab
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
alphaonelabs/website#1144 · 1 comment ·
Maintainers usually reply within 1 day
-
Fix PMOSS docs: broken code blocks, stale repo URLs and database namePossibly taken @KanishJebaMathewM claimed this today. Open2026-11 documentation good first issue gsoc-2027 project: pmoss
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
alphaonelabs/website#1139 · 1 comment ·
Maintainers usually reply within 1 day
-
EarthMind rejects valid readings whose value is 0Possibly taken @snehaapratap claimed this 1 day ago. Open2026-11 bug good first issue gsoc-2027 project: earthmind
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
alphaonelabs/website#1136 · 1 comment ·
Maintainers usually reply within 1 day
All issues in alphaonelabs/website
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
🔊 a11y
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
betagouv/mon-entreprise#4726 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Deltares/fews-pi-requests#357 ·
Maintainers usually reply within 1 day
-
bug confirmed js v6
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nopSolutions/nopCommerce#8440 ·
Maintainers usually reply within 1 day