Skip to content
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

fix: prevent Esc key from closing terminal modals #968

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

drudge
Copy link
Contributor

@drudge drudge commented Dec 23, 2024

This PR fixes the issue where pressing the Escape key in terminal modals triggers an unwanted exit confirmation. The fix:

  1. Adds onEscapeKeyDown handler to prevent default behavior in both docker terminal modal components
  2. Maintains consistent behavior with the existing web server terminal modal
  3. Prevents accidental terminal closures while maintaining the explicit confirmation dialog

Changes:

  • Added escape key prevention to main terminal dialog in both docker terminal modals
  • Added escape key prevention to confirmation dialogs
  • Follows the pattern from the working terminal-modal.tsx implementation

Made by Devin

Co-Authored-By: Nicholas Penree <nick@penree.com>
(cherry picked from commit ee469d5)
@drudge drudge marked this pull request as ready for review December 23, 2024 05:02
@drudge drudge requested a review from Siumauricio as a code owner December 23, 2024 05:02
@drudge
Copy link
Contributor Author

drudge commented Dec 23, 2024

This makes vi/vim usable!

@Siumauricio Siumauricio merged commit 3133615 into Dokploy:canary Dec 23, 2024
3 checks passed
@Siumauricio Siumauricio mentioned this pull request Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants