-
Notifications
You must be signed in to change notification settings - Fork 13.4k
bug: searchInput.setFocus() does not work on IOS #25271
Copy link
Copy link
Closed
Labels
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
When i open a modal with a search input on desktop focus function does work, when doing the same in Safari/Chrome in IOS ir does not
Expected Behavior
When i open a modal with a search input on desktop/IOS the search input is on focus
Steps to Reproduce
I have an ionic app using Vue3 and i have this watchEffect, so after the state of the modal is change, it does run.
This does set the focus on Desktop not in Safari (IOS)
watchEffect(() => {
const searchInputElem = searchInput.value?.$el;
nextTick(() => {
setTimeout(() => {
searchInputElem && searchInputElem.setFocus();
}, 750);
});
});Code Reproduction URL
No response
Ionic Info
"@ionic/vue": "5.9.3",
"@ionic/vue-router": "5.9.3",
Additional Information
No response
Reactions are currently unavailable