Skip to content

[HIGH] [SDL #2921] SDL_StartTextInput() mangles Android joystick input #160

Description

@Chevalier12

Tracking upstream SDL issue libsdl-org#2921

  • Priority: HIGH — provisional triage from SDL-OPEN-ISSUES-PRIORITIES.md, NOT an official SDL severity.
  • Source: SDL_StartTextInput() mangles Android joystick input libsdl-org/SDL#2921
  • Original title: SDL_StartTextInput() mangles Android joystick input
  • Reported by: SDLBugzilla
  • Upstream state at capture: open; state reason:
  • Created: 2021-02-11T01:09:14.0000000Z; updated: 2024-12-04T17:05:41.0000000Z
  • Snapshot captured: 2026-09-07T17:43:57.3380962Z
  • Upstream labels:
  • Upstream milestone (not affected versions): 3.x (https://github.com/libsdl-org/SDL/milestone/6)
  • Upstream assignees: slouken
  • Upstream comments included: 0
  • Locked: False; lock reason:
  • Triage rationale: Blocare de evenimente/UI sau ANR raportat; verificați versiunea și scenariul înainte de fix.

This is an attributed tracking copy, not a locally reproduced or confirmed Graphix defect. Applicability, affected versions and ownership still require validation. No automatic synchronization or resolution is implied. Original descriptions and comments are preserved literally in Markdown code blocks to avoid notifying mentioned users or resolving SDL references against Graphix. Attachments, logs, patches and other linked resources remain at their original URLs; external resource contents and edit/event histories are not copied.

Graphix validation checklist

  • Read the current upstream issue and discussion.
  • Establish affected versions/platforms and whether Graphix is affected.
  • Reproduce the reported behavior and identify the invariant owner.
  • Implement an ownership-correct fix or document an upstream/external resolution.
  • Verify regression coverage and applicable platform/runtime gates.

Original description

# This bug report was migrated from our old Bugzilla tracker.

**Reported in version:** 2.0.7
**Reported for operating system, platform:** Android (All), ARM

# Comments on the original bug report:

On 2018-06-08 13:09:10 +0000, RobLM wrote:

> Joystick (game controller) events are limited and mangled after calling SDL_StartTextInput() on Android. This might be due to the OS entering 'text input mode'. Apps also generate a lot of ANRs (6000ms UI timeout warnings) while processing joystick events afterwards.
> 
> On my phone and game controller only the left stick and D-pad generate any events in the mangled mode, with the D-pad sending wrong axis IDs. The adb log is also spammed with ANRs.
> 
> I solved this by adding:
> mLayout.removeView(mTextEdit);
> 
> To the SDLActivity SDLCommandHandler 'COMMAND_TEXTEDIT_HIDE' case so the DummyEdit is completely removed from the UI stack. This way regular joystick control resumes after finishing text entry. It would be nice however to find a way to make joystick buttons and axes work during text entry as well.

On 2018-06-09 13:30:50 +0000, RobLM wrote:

> After more testing, it turns out that my previous fix prevents the soft keyboard showing for successive calls to SDL_StartTextInput().
> 
> Unfocusing the text field using 'mLayout.requestFocus();' seems to work as a better fix. It re-enables joystick events and doesn't permanently hide the soft keyboard.

Original discussion (chronological)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions