From 1ad2eb5d16ec82e649254d57679140ff7c2ef88a Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 8 Aug 2026 21:28:40 +0200 Subject: [PATCH] fix: do not reset focus to card[0] on late apply() retries (stops remote right->left jump) --- plugin.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin.js b/plugin.js index 51e29d2..94bb903 100644 --- a/plugin.js +++ b/plugin.js @@ -98,10 +98,15 @@ var cards = g.find('.card.selector'); if (!cards.length) return; + // Re-register controller on every call, but only reset focus the FIRST time + // (so an async catalog load / late retry does not yank focus back to card[0]). + var first = !apply._inited; + apply._inited = true; + Lampa.Controller.add('content', { toggle: function () { Lampa.Controller.collectionSet(g); - Lampa.Controller.collectionFocus(cards[0], g); + if (first) Lampa.Controller.collectionFocus(cards[0], g); }, right: function () { Navigator.move('right'); }, left: function () {