Ionic-framework: ion-searchbar should have an option to always show the back button

Created on 26 Sep 2016  路  8Comments  路  Source: ionic-team/ionic-framework

Short description of the problem:

ion-searchbar should have an option to always show the back button.

What behavior are you expecting?

Like the Whatsapp/Instagram behavior on their search contact modals.

Which Ionic Version? 1.x or 2.x

Ionic 2.x

Most helpful comment

Since we don't have automatic focus on search bar component on Ionic, the back button/Cancel only shows when user give the focus to the search bar. Which is bad for modals.

On Android, whatsapp opens a search modal focused in search bar with back button.

screenshot_20160926-1618392 small

If the user scrolls the list and search bar loses focus, back button remains shown.

screenshot_20160926-1615592 small

All 8 comments

@cleever Can you share a screenshot? I don't know what you mean? WhatsApp for iOS uses the same searchbar than ionic.

Since we don't have automatic focus on search bar component on Ionic, the back button/Cancel only shows when user give the focus to the search bar. Which is bad for modals.

On Android, whatsapp opens a search modal focused in search bar with back button.

screenshot_20160926-1618392 small

If the user scrolls the list and search bar loses focus, back button remains shown.

screenshot_20160926-1615592 small

Is there any update to this issue?

Hello everyone! Thanks for the feature request. I'm going to move this issue over to our internal list of feature requests for evaluation. We are continually prioritizing all requests that we receive with outstanding issues. We are extremely grateful for your feedback, but it may not always be our next priority. I'll copy the issue back to this repository when we have begun implementation. Thanks!

This issue was moved to driftyco/ionic-feature-requests#174

@jgw96 404...
Is this still tracked somewhere?

Try to use the following CSS:

.searchbar-ios-cancel{
    margin-right: 0px !important;
    opacity: 1!important;
    padding-left: 10px !important;
}
.searchbar-md .searchbar-md-cancel{
    display: inline-flex !important;
    background-color: white !important;
}
.searchbar-search-icon{
    display: none;
}

It worked for me!!

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manucorporat picture manucorporat  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

danbucholtz picture danbucholtz  路  3Comments

Macstyg picture Macstyg  路  3Comments

giammaleoni picture giammaleoni  路  3Comments