-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Capacitor Version
Latest Dependencies:
@capacitor/cli: 7.4.4
@capacitor/core: 7.4.4
@capacitor/android: 7.4.4
@capacitor/ios: 7.4.4
Installed Dependencies:
@capacitor/cli: 7.4.3
@capacitor/android: 7.4.3
@capacitor/core: 7.4.3
@capacitor/ios: 7.4.3
Other API Details
npm: 10.9.0
node: v22.12.0Platforms Affected
- iOS
- Android
- Web
Current Behavior
On Android 13, the focused element (document.activeElement) is not preserved after rotating the screen when using the "Tab" key on an external keyboard to navigate between elements. As a result, the focus incorrectly resets to the element after rotation.
This issue does not happen if using touch or if the focused element is an input or a text area.
This issue does not happen on Android 14 and 15.
Expected Behavior
On Android 13, the focused element (document.activeElement) should remain the same before and after screen rotation when using the "Tab" key on an external keyboard to navigate between elements.
Project Reproduction
https://github.com/ionic-team/capacitor-testapp
Additional Information
Testing devices
- Galaxy Tab S6 Lite - Android 13
- Galaxy Tab A9+ - Android 15
How to reproduce
- Start the test app on Android 13
- Connect to an external keyboard
- In the Home page, use the "Tab" key to navigate and focus any buttons
- Rotate the screen
- Observe the result