From 5789a09dedc327d2db4bd8e3a1d92bff8851fbd7 Mon Sep 17 00:00:00 2001 From: Commodore64user <97603719+Commodore64user@users.noreply.github.com> Date: Tue, 26 May 2026 16:12:51 +0100 Subject: [PATCH] KeySelection: open links at current indicator position, footnote handling --- .../apps/reader/modules/readerkeyselection.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/apps/reader/modules/readerkeyselection.lua b/frontend/apps/reader/modules/readerkeyselection.lua index 275056637..1a3c27e18 100644 --- a/frontend/apps/reader/modules/readerkeyselection.lua +++ b/frontend/apps/reader/modules/readerkeyselection.lua @@ -307,10 +307,17 @@ function ReaderKeySelection:highlightPress(skip_tap_check) self:stopHighlightIndicator() return true end - -- Attempt to open an existing highlight - if not skip_tap_check and self.ui.highlight:onTap(nil, self:_createHighlightGesture("tap")) then - self:stopHighlightIndicator(true) -- need_clear_selection=true - return true + if not skip_tap_check then + -- Follow link if there's one at the current indicator position + if self.ui.link and self.ui.link:onTap(nil, self:_createHighlightGesture("tap")) then + self:stopHighlightIndicator() + return true + end + -- Attempt to open an existing highlight + if self.ui.highlight:onTap(nil, self:_createHighlightGesture("tap")) then + self:stopHighlightIndicator(true) -- need_clear_selection=true + return true + end end -- no existing highlight at current indicator position: start hold self._start_indicator_highlight = true