Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] keyboard cause pane created at wrong position #245

Open
henryyuuu opened this issue Aug 27, 2024 · 5 comments
Open

[BUG] keyboard cause pane created at wrong position #245

henryyuuu opened this issue Aug 27, 2024 · 5 comments
Assignees

Comments

@henryyuuu
Copy link

In my use case, there's an input field for user to type some text with keyboard. After user click search button on keyboard, a new pane will be created immediately, and the keyboard will close at the same time.
however, it seems that the bottom of the pane will be in the middle of the screen, which is the top position of the keyboard which is already closed.
Instead of create the pane with a small delay, is there any better way to re-calculate the position of the pane?
Thanks very much!

@roman-rr roman-rr self-assigned this Aug 27, 2024
@roman-rr
Copy link
Collaborator

roman-rr commented Aug 27, 2024

Hello @henryyuuu !
This is definitely not proper behavior, and I guess this is some cross-framework issue.
Could you please provide more information, such as: framework you are using, and version of package.
Perfect, if you can create a dummy repo that will introduce the issue, or at least capture some video.

@henryyuuu
Copy link
Author

after some tests and tracing the code, i found that this bug is cause by present method's updateScreenHeights gets wrong window.innerHeight. In my case, when the keyboard is open, the window.innerHeight is 398, when the keyboard is hidden, the window.innerHeight is 628.
However, even i manually call updateScreenHeights after the keyboard is hidden, the pane is still in wrong position.

@roman-rr
Copy link
Collaborator

@henryyuuu Thank you. Are you able to share code or repo, so I can easy and fastly debug it?

@henryyuuu
Copy link
Author

The code i mentioned above is here.
Sorry i cannot provide my code due to some privacy issue.
I solution to this problem is extending CupertinoPane and override the updateScreenHeights method to make it possible to get the window height without affect by keyboard showing or not.

@roman-rr
Copy link
Collaborator

@henryyuuu

  • What framework do you using?
  • Device you are using or emulator version?
  • Have you seen this page https://panejs.com/keyboard-issues.html with description?
  • Could you try to play with handleKeyboard: false/true ? Does issue still persist?
  • Issue related to all iOS/Android/Browser ?

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

No branches or pull requests

2 participants