bug: Buttons no longer align with ion-searchbar
See original GitHub issueBug Report
Ionic version:
[x] 4.10.0
Current behavior:
Add an ion-buttons
next to an ion-searchbar
component within a toolbar. On iOS they no longer align in v4.10.0. Unless there is a different way to align buttons next to a ion-searchbar that I am unaware of I believe this is a bug?
Expected behavior:
I’d expect buttons within ion-buttons
to align with the searchbar on iOS.
Steps to reproduce:
Related code:
<ion-header>
<ion-toolbar>
<ion-searchbar></ion-searchbar>
<ion-buttons slot="end">
<ion-button (click)="goBack()">
Cancel
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
Other information:
I believe this is due to the addition of https://github.com/ionic-team/ionic/commit/e27962dcaf98bfb1f4c026df5a8c525ee3773261#diff-d7830cbb2e9f6ba7efe16e29aaac9c6b specifically the padding-top: 1px !important;
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Search bar in header is not vertically centered on iOS
it looks just perfect on Android - the search bar and the menu button are perfectly vertically aligned at the center of the...
Read more >Align menu icon to the left in ionic framework - Stack Overflow
There's no CSS code as I'm using the default codes. This is my ionic code: <ion-header> <ion-toolbar> <ion-buttons start> <button ion-button ...
Read more >signature=2a3d42e824fdb875bb87c5e22ef6d4b9,ionic-framework ...
Bug Fixesbackdrop: nvda no longer incorrectly announces backdrop (#22481) (2d878fc) ... select: properly align label with select in item in MD mode (#22330) ......
Read more >Angular 4 / ionic 3 custom attribute directive not working
Whenever I try to use the directive in ion-searchbar it gives the following error. I don't know what am I missing. Can't bind...
Read more >How to make my ion-searchbar (ion-input) sticky...anycodings
How to make my ion-searchbar (ion-input) sticky on the top nav bar in Ionic? My html form shows a list from JSON API...
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
Thanks for the feedback! So like I said, we can update the buttons so that they are aligned with the searchbar but this will put them closer to the top. This is due to the iOS spec which normally does not include buttons by a searchbar. Here’s a picture of the spec to see where the numbers come from:
And here are some examples of the searchbar in a toolbar by itself:
I’ll look into a fix for the buttons. 🙂
I’m really grateful for your helps ^_^