Ion-input is pushed behind header after focus on iOS
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior: When focussing an ion-input element in iOS, the keyboard opens and scroll up so that the input is properly in view. If you focus another input just below it, keeping the keyboard active, the view scrolls down so that the input is halfway covered by the header.
Expected behavior: When focussing the second ion-input I expect the view to scroll to a position where the ion-input is centered in the view.
Steps to reproduce: Select an ion-input. When the keyboard is open, select an ion-input below it. The second input should be positioned somewhere halfway under the header.
Related code:
<ion-list class="data-form__content">
<ion-item class="data-form__content__item">
<ion-label color="secondary" position="stacked">Voornaam</ion-label>
<ion-input
[(ngModel)]="info.klant_naam"
type="text">
</ion-input>
</ion-item>
<ion-item class="data-form__content__item">
<ion-label color="secondary" position="stacked">Voorletters</ion-label>
<ion-input
[(ngModel)]="info.klant_voorletters"
type="text">
</ion-input>
</ion-item>
<ion-item class="data-form__content__item">
<ion-label color="secondary" position="stacked">Achternaam</ion-label>
<ion-input
[(ngModel)]="info.klant_achternaam"
type="text">
</ion-input>
</ion-item>
....
</ion-list>
Other information: I’m opening this as a new issue based on this issue, as it was locked by the ionic bot.
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.10.1 (C:\Users\sjoerd\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.9.0-rc.1
@angular-devkit/schematics : 7.0.0-rc.1
@angular/cli : 7.0.0-rc.1
@ionic/angular-toolkit : not installed
Capacitor:
capacitor (Capacitor CLI) : 1.0.0-beta.17
@capacitor/core : 1.0.0-beta.17
System:
NodeJS : v10.11.0 (C:\Program Files\nodejs\node.exe)
npm : 6.6.0
OS : Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:12 (5 by maintainers)
Top Results From Across the Web
bug: Ion-input is pushed behind header after focus on iOS ...
The expected behavior is that the page wouldn't scroll so heigh that the input is off the page. Steps to Reproduce. I've only...
Read more >Focus on ion-input hides Header in iOS - Ionic Forum
I run .disableScroll(true) right after platform.ready(), and it seems to solves the issue.
Read more >prevent first input focus in ionic - Stack Overflow
You can use tabindex attribute to direct the focus. Setting it to -1 will never auto focus.
Read more >Wrong Focus With Ionic 3 Ion-Input - ADocLib
When an ioninput component resides within an ioncol component the onscreen keyboard <ionheader> <ionnavbar ... is pushed behind header after focus on iOS....
Read more >The Impact of iOS 15 Focus Mode on Customer Engagement
In September 2021, Apple released iOS 15, which included a new feature called Focus Mode that gives users the ability to reduce potential ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@adamduren It will be in the next patch release, scheduled next Wednesday.
Thanks a ton to @pegler for working on this! I created a dev build with his PR:
4.5.0-dev.201905141454.56040e0
if anyone would like to test it out and let us know if you see anything wrong. It seems to be working well for me, I will merge it in soon. 🙂