We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7edc4fc commit e7384e0Copy full SHA for e7384e0
mcpgateway/static/admin.js
@@ -536,6 +536,17 @@ function openModal(modalId) {
536
}
537
538
539
+// Global event handler for Escape key
540
+document.addEventListener("keydown", (event) => {
541
+ if (event.key === "Escape") {
542
+ // Find any active modal
543
+ const activeModal = Array.from(AppState.activeModals)[0];
544
+ if (activeModal) {
545
+ closeModal(activeModal);
546
+ }
547
548
+});
549
+
550
function closeModal(modalId, clearId = null) {
551
try {
552
const modal = safeGetElement(modalId);
0 commit comments