You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
On real devices with a virtual keyboard, this line throws an uncaught exception if an input is focused and then changed with an accessory view.
To Reproduce
Steps to reproduce the behavior:
Create a bottom pane with a text input; make sure that input is going to show the accessory view Keyboard.setAccessoryBarVisible({ isVisible: visible }); if using capacitor with the Keyboard plugin.
Launch the bottom pane and focus on the input (make sure the virtual keyboard is visible)
Type in the input to cause another keyboardWillShow events to fire
See error
Expected behavior
This component is using the keyboardWillShow event to capture the proper breakpoint before the keyboard is shown and then holding on to that breakpoint in prevBreakpoint. However an error is thrown if this is handler is called a second time because the line referenced above does not find a breakpoint (keyboard is already showing and so the pane has been translated already to a new position).
Screenshots
Error: undefined is not an object (evaluating 'Object.entries(this.breakpoints.breaks).find((function(t){return t[1]===e.instance.getPanelTransformY()}))[0]')
Smartphone:
Device: iPhones, iPads, and Android devices
OS: 15.2 / Android 11 but possibly others
Browser: Capacitor / Cordova apps
Additional context
This stackoverflow issue / "solution" describes how the keyboardWillShow can be called multiple times without a keyboardWillHide. One solution could be to track an instance variable so that when the keyboard initially shows the event callback is execute once and not again until the instance variable is cleared by reseting it in the keyboardWillHide callback.
The text was updated successfully, but these errors were encountered:
Describe the bug
On real devices with a virtual keyboard, this line throws an uncaught exception if an
input
is focused and then changed with an accessory view.To Reproduce
Steps to reproduce the behavior:
Keyboard.setAccessoryBarVisible({ isVisible: visible });
if using capacitor with the Keyboard plugin.keyboardWillShow
events to fireExpected behavior
This component is using the
keyboardWillShow
event to capture the proper breakpoint before the keyboard is shown and then holding on to that breakpoint inprevBreakpoint
. However an error is thrown if this is handler is called a second time because the line referenced above does not find a breakpoint (keyboard is already showing and so the pane has been translated already to a new position).Screenshots
Error: undefined is not an object (evaluating 'Object.entries(this.breakpoints.breaks).find((function(t){return t[1]===e.instance.getPanelTransformY()}))[0]')
Smartphone:
Additional context
This stackoverflow issue / "solution" describes how the
keyboardWillShow
can be called multiple times without akeyboardWillHide
. One solution could be to track an instance variable so that when the keyboard initially shows the event callback is execute once and not again until the instance variable is cleared by reseting it in thekeyboardWillHide
callback.The text was updated successfully, but these errors were encountered: