https://bugs.kde.org/show_bug.cgi?id=526777

Albert Vaca Cintora <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/netw
                   |                            |ork/kdeconnect-android/-/co
                   |                            |mmit/38d78b4057e6ac7b4b45ee
                   |                            |ea304cc68d1b1762e7

--- Comment #3 from Albert Vaca Cintora <[email protected]> ---
Git commit 38d78b4057e6ac7b4b45eeea304cc68d1b1762e7 by Albert Vaca Cintora, on
behalf of Masum Ali.
Committed on 14/10/2026 at 12:39.
Pushed by albertvaka into branch 'master'.

settings: Fix input duplication in device name InputFilter

According to Android's `InputFilter` contract, `filter()` must return `null` to
accept the replacement as-is without modification.

Always returning a new `String` (even when no characters are removed) breaks
the IME's active composing spans in predictive keyboards such as Gboard and
Samsung Keyboard. The IME assumes the composing buffer was rejected or
desynchronized and re-commits the composing session on subsequent keystrokes,
leading to character duplication (e.g. typing `abcd` results in `aabcaabcd`).

By returning `null` when no invalid characters were filtered out (and copying
spans when returning filtered text), the keyboard maintains proper composing
state and input works cleanly.

Also fixes the second `setOnBindEditTextListener` call silently overwriting
`setSingleLine`.

M  +15   -0    src/main/java/org/kde/kdeconnect/helpers/DeviceHelper.kt
M  +2    -3    src/main/java/org/kde/kdeconnect/ui/SettingsFragment.kt
A  +39   -0    src/test/java/org/kde/kdeconnect/helpers/DeviceHelperTest.kt

https://invent.kde.org/network/kdeconnect-android/-/commit/38d78b4057e6ac7b4b45eeea304cc68d1b1762e7

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to