-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: ESC key does not cancel editing in data browser cell #3001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughWalkthroughAdds ESC/cancel handling and switches key listeners from keypress/click to keydown/touchend across editors. Introduces an optional onCancel prop for DateTimeEditor and propagates onCancel through Browser.Editor to all editor types. Updates mount/unmount listeners accordingly and adjusts Enter key paths to prevent default behavior. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant E as Editor (e.g., String/Number/DateTime/GeoPoint)
participant B as Browser.Editor (parent)
rect rgba(230,240,255,0.4)
note over U,E: Key handling on keydown
U->>E: keydown Enter
E->>E: validate/prepare value
E-->>B: onCommit(value)
E-->>U: preventDefault + stopPropagation
end
rect rgba(255,235,230,0.5)
note over U,E: Cancel flow on Escape
U->>E: keydown Escape
alt onCancel provided
E-->>B: onCancel()
else
E-->>B: onCommit(original/current value)
end
E-->>U: preventDefault + stopPropagation
end
rect rgba(235,255,235,0.5)
note over U,E: External interaction
U->>E: body touchend (outside)
E->>E: checkExternalClick()
alt commit or cancel per editor state
E-->>B: onCommit(...) or onCancel()
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code graph analysis (1)src/dashboard/Data/Browser/Editor.react.js (4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uffizzi Ephemeral Environment
|
# [7.6.0-alpha.10](7.6.0-alpha.9...7.6.0-alpha.10) (2025-10-14) ### Bug Fixes * ESC key does not cancel editing in data browser cell ([#3001](#3001)) ([d1d7241](d1d7241))
🎉 This change has been released in version 7.6.0-alpha.10 |
New Pull Request Checklist
Issue Description
When hitting the Esc key while editing a cell in the DataBrowser table, the editing does not abort.
Approach
According to MDN Web Docs, the keypress event is deprecated:
So this change also modernizes the code to follow current web standards.
The root cause chain was:
By changing to keydown:
Summary by CodeRabbit
New Features
Improvements
Bug Fixes