From 622fa468fbfbc8aee45f1aefd23010e9a273607e Mon Sep 17 00:00:00 2001 From: j Date: Thu, 15 Jan 2026 17:40:15 +0000 Subject: [PATCH] close preview with escape --- static/js/list.js | 6 ++++++ static/js/previewPlayer.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/static/js/list.js b/static/js/list.js index 03fe29d9..198c02a5 100644 --- a/static/js/list.js +++ b/static/js/list.js @@ -490,6 +490,12 @@ pandora.ui.list = function() { pandora.$ui.previewDialog.update(); } }, + key_escape: function() { + if (pandora.$ui.previewDialog) { + pandora.$ui.previewDialog.close(); + delete pandora.$ui.previewDialog; + } + }, paste: function(data) { var items = pandora.clipboard.paste(); if (items.length && pandora.clipboard.type() == 'item' && pandora.getListData().editable) { diff --git a/static/js/previewPlayer.js b/static/js/previewPlayer.js index 5a83be61..1d6b2b84 100644 --- a/static/js/previewPlayer.js +++ b/static/js/previewPlayer.js @@ -145,6 +145,9 @@ pandora.ui.previewPlayer = function() { close: function() { that.close(); }, + key_escape: function() { + that.close(); + }, open: function() { pandora.UI.set({ item: options.item