From d4a50519141345191763b3cacc6f709e3431bc56 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 8 Aug 2026 19:00:08 +0200 Subject: [PATCH] remove duplicate keydown back listeners (caused recursion); rely on Lampa native back --- plugin.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/plugin.js b/plugin.js index 0aa1df6..681a782 100644 --- a/plugin.js +++ b/plugin.js @@ -83,17 +83,9 @@ this.create = function (b) { body = b; - comp._onKey = function (e) { - if (e.key === 'Backspace' || e.key === 'Escape') { - e.preventDefault(); - Lampa.Activity.back(); - } - }; - document.addEventListener('keydown', comp._onKey, true); }; this.destroy = function () { - if (comp._onKey) document.removeEventListener('keydown', comp._onKey, true); }; // Wire up keyboard/remote navigation (pattern from Shikimori plugin). @@ -216,18 +208,9 @@ this.create = function (b) { body = b; - // Browser/keyboard fallback: Backspace / Escape -> back (remote uses Controller 'back') - comp._onKey = function (e) { - if (e.key === 'Backspace' || e.key === 'Escape') { - e.preventDefault(); - Lampa.Activity.back(); - } - }; - document.addEventListener('keydown', comp._onKey, true); }; this.destroy = function () { - if (comp._onKey) document.removeEventListener('keydown', comp._onKey, true); }; this.start = function () {