Skip to content

fix: Avoid restoring platform input control#7

Closed
EArminjon wants to merge 1 commit intoMasum-MSNR:mainfrom
EArminjon:fix/avoid-restoring-platform-input-control
Closed

fix: Avoid restoring platform input control#7
EArminjon wants to merge 1 commit intoMasum-MSNR:mainfrom
EArminjon:fix/avoid-restoring-platform-input-control

Conversation

@EArminjon
Copy link
Copy Markdown
Contributor

Scenario :

  • I'm at home
  • I push a page using a standalone virtual keypad
  • I go to an other page which also use a standalone virtual keypad.

Behavior :

The virtual keypad no longer work and open.

Explanation :

The first page dispose is called after the second page initState. In Flutter, the dispose callback is called at the moment at the page disappear from the screen, so at the end of the pop animation. Calling pop didn't call directly dispose.

By consequence, the second page which call TextInput.setInputControl(...) in his initState is override by the TextInput.restorePlatformInputControl() present in the previous page dispose.

This PR remove the useless TextInput.restorePlatformInputControl(). We didn't see any issue on our app using that.

@EArminjon EArminjon marked this pull request as draft March 13, 2026 13:57
@EArminjon EArminjon force-pushed the fix/avoid-restoring-platform-input-control branch from 46d363e to 36e6556 Compare March 13, 2026 14:06
@EArminjon EArminjon marked this pull request as ready for review March 13, 2026 14:06
@EArminjon EArminjon force-pushed the fix/avoid-restoring-platform-input-control branch from 36e6556 to 8cc3ae7 Compare March 13, 2026 14:06
Comment thread analysis_options.yaml
@Masum-MSNR
Copy link
Copy Markdown
Owner

Thanks for the PR and the detailed explanation! I’ll review it and merge shortly. Appreciate your continued contributions.
@EArminjon

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.

2 participants