Open henryyuuu opened 2 weeks ago
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.
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.
@henryyuuu Thank you. Are you able to share code or repo, so I can easy and fastly debug it?
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.
@henryyuuu
handleKeyboard: false/true
? Does issue still persist?
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!