Skip to content

Fix keyboard dismissal on input widgets on iOS#4452

Draft
johnzhou721 wants to merge 2 commits into
beeware:mainfrom
johnzhou721:textinputdismissal
Draft

Fix keyboard dismissal on input widgets on iOS#4452
johnzhou721 wants to merge 2 commits into
beeware:mainfrom
johnzhou721:textinputdismissal

Conversation

@johnzhou721
Copy link
Copy Markdown
Contributor

There is already a fix for #1236 in MultiLineTextInput, but the keyboard dismissal doesn't animate; fooling around with Gemini reveals that the widget must be resigned at the next event loop iteration for this to work. The why is sort of a mystery, but so is everything layout-related in iOS.

After the fix, the same solution is applied to NumberInput and TextInput and manages to dismiss flawlessly on the relevant demo apps (since they can't be tested in CI).

Refs #1236 (partial for iOS)

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: Gemini

There is already a fix for beeware#1236 in MultiLineTextInput, but the keyboard
dismissal doesn't animate; fooling around with Gemini reveals that the
widget must be resigned at the next event loop iteration for this to
work.  The why is sort of a mystery, but so is everything layout-related
in iOS.

After the fix, the same solution is applied to NumberInput and TextInput
and manages to dismiss flawlessly on the relevant demo apps (since they
can't be tested in CI).

Assisted-By: Gemini
@johnzhou721
Copy link
Copy Markdown
Contributor Author

For core team: iOS failure seems intermittent. Can someone rerun to confirm?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant