From b8a3d1d7ea0cd34e3bacf87e06d90a5b4d73d8f3 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Sun, 13 Oct 2024 12:10:05 +0300

Subject: [PATCH 1/1] Mobile: Native input widgets was leaking key events

Sometimes arrow keys would cause accidental navigation while

entering text in the native widget.


res/about/ios-version.gmi | 1 +

src/ui/inputwidget.c | 18 ++++++++++++++++--

2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/res/about/ios-version.gmi b/res/about/ios-version.gmi

index bffd11f8..9e3be676 100644

--- a/res/about/ios-version.gmi

+++ b/res/about/ios-version.gmi

@@ -7,6 +7,7 @@

Release notes

1.18 (4)

+* Fixed accidental navigation when editing text with the keyboard.

diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c

index 63b7fa21..593b32dd 100644

--- a/src/ui/inputwidget.c

+++ b/src/ui/inputwidget.c

@@ -2679,7 +2679,6 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {

                     return iTrue;

                 }

             }

-#endif

             if (d->inFlags & enterKeyEnabled_InputWidgetFlag &&

                 (checkAcceptMods_InputWidget_(d, mods) ||

                  (~d->inFlags & lineBreaksEnabled_InputWidgetFlag))) {

@@ -2695,6 +2694,10 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {

                 return iTrue;

             }

             return iFalse;

+#else

+#endif

         case SDLK_ESCAPE:

             end_InputWidget(d, iTrue);

             setFocus_Widget(NULL);

@@ -2865,7 +2868,18 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {

             }

             refresh_Widget(d);

             return iTrue;

-#endif /* !LAGRANGE_USE_SYSTEM_TEXT_INPUT */

+#else /* !LAGRANGE_USE_SYSTEM_TEXT_INPUT */

+#endif

     }

     if (mods & (KMOD_GUI | KMOD_CTRL)) {

         return iFalse;

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/patch/b8a3d1d7ea0cd34e3bacf87e06d90a5b4d73d8f3.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
26.201908 milliseconds
Gemini-to-HTML Time
2.428223 milliseconds

This content has been proxied by September (ba2dc).