ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

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

Open cleever opened this issue 10 years ago • 8 comments

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

cleever avatar Sep 26 '16 17:09 cleever

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

manucorporat avatar Sep 26 '16 18:09 manucorporat

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

cleever avatar Sep 26 '16 19:09 cleever

Is there any update to this issue?

gunterberger avatar Feb 09 '17 18:02 gunterberger

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!

jgw96 avatar Apr 14 '17 17:04 jgw96

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

jgw96 avatar Apr 14 '17 17:04 jgw96

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

felschr avatar May 31 '17 13:05 felschr

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

thisIsChetan avatar Sep 22 '17 09:09 thisIsChetan

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.

ionitron-bot[bot] avatar Sep 02 '18 01:09 ionitron-bot[bot]