Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): handle uncaught native keyboard exceptions (#27514)
Issue number: Resolves #27503 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Ionic Framework wraps the implementation around Capacitor's Keyboard plugin API, to provide additional functionality and behavior "automatically" in Ionic, when the plugin is installed. Certain methods such as `getResizeMode()` are only available for certain platforms and will cause an error when running in the unsupported platform. Ionic Framework does not check to see if that platform is active before calling potentially unsupported methods, which leads to an exception for scenarios such as this - calling `getResizeMode()` on Android. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Handles the uncaught exception by returning `undefined` if the plugin method is unavailable. - Developers do not receive an uncaught exception on Android when using the Capacitor Keyboard plugin with Ionic Framework ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev-build: `7.0.8-dev.11684444351.1b1ab142` (outdated)
- Loading branch information