Files
chanora/apps/chanora_flutter
EdisonJwa 23bd1c7930 fix(ui,ios): force TextInput.show on first tap (keyboard-up-on-first-tap)
User reported: 'input field still need to click twice' on iPhone.
The 020be77 Listener + requestFocus() approach was insufficient.

Root cause analysis:

  * Flutter's EditableText opens the platform TextInput method
    channel (which is what slides the iOS soft keyboard up) only
    after a TapGestureRecognizer wins the gesture arena.

  * Our outer Listener calls node.requestFocus() pre-arena. That
    flags the FocusNode as focused in Flutter's focus tree, but
    does NOT open the TextInput channel \u2014 so iOS keeps the OS
    keyboard hidden until EditableText's own tap recognizer wins
    on a second tap.

  * requestFocus on its own is therefore a no-op for the user
    visually: the cursor + caret appear briefly but the keyboard
    stays down.

Fix: in the Listener.onPointerDown handler, additionally invoke
'TextInput.show' on SystemChannels.textInput. This is the same
private platform RPC EditableText calls internally on attach;
forcing it ourselves slides the keyboard up regardless of arena
state.

Belt-and-braces with the existing requestFocus() guarantees
keyboard-on-first-tap on iPhone / iPad and is harmless on:
  * Android (the platform ignores the redundant show call when
    the keyboard is already up),
  * Linux / Windows / macOS desktop (no soft keyboard exists; the
    method channel handler returns success without doing
    anything).

No new imports needed \u2014 SystemChannels is already in
package:flutter/services.dart (imported for FilteringTextInputFormatter).

flutter build ios --release --no-codesign: 20.7 s, Runner.app
30.2 MB.
2026-05-16 18:23:57 +08:00
..

chanora_flutter

Chanora — cross-platform voice client for TeamSpeak-compatible servers.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.