question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Buttons no longer align with ion-searchbar

See original GitHub issue

Bug 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.

Screenshot 2019-09-30 at 17 35 10

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:23 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
brandyscarneycommented, Oct 2, 2019

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:

Screen Shot 2019-10-02 at 10 25 35 AM

And here are some examples of the searchbar in a toolbar by itself:

IMG_8140 IMG_8141

I’ll look into a fix for the buttons. 🙂

1reaction
thiennm2905commented, Oct 8, 2019

I’m really grateful for your helps ^_^

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found