From 44508a323476e999c283058d85dbb896629eb494 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Mon, 14 Dec 2015 12:37:37 -0500 Subject: [PATCH] fix(searchbar): add click events back for safari references #731 --- ionic/components/searchbar/searchbar.ios.scss | 2 ++ ionic/components/searchbar/searchbar.ts | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ionic/components/searchbar/searchbar.ios.scss b/ionic/components/searchbar/searchbar.ios.scss index 9c7ebe4b9b..71e146e473 100644 --- a/ionic/components/searchbar/searchbar.ios.scss +++ b/ionic/components/searchbar/searchbar.ios.scss @@ -32,6 +32,7 @@ $searchbar-ios-input-clear-icon-size: 18px !default; ion-searchbar { padding: $searchbar-ios-padding-top-bottom $searchbar-ios-padding-left-right; background: $searchbar-ios-background-color; + border-top: 1px solid transparent; border-bottom: 1px solid $searchbar-ios-border-color; min-height: $searchbar-ios-min-height; } @@ -103,6 +104,7 @@ ion-searchbar { min-height: 30px; margin-left: 0; + margin-right: 0; padding: 0; visibility: hidden; diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts index 1e28f22852..40543f3084 100644 --- a/ionic/components/searchbar/searchbar.ts +++ b/ionic/components/searchbar/searchbar.ts @@ -40,12 +40,14 @@ import {Button} from '../button/button'; }, template: '
' + - '' + + '' + '
' + '' + - '' + + '' + '
' + - '', + '', directives: [FORM_DIRECTIVES, NgIf, NgClass, Icon, Button, forwardRef(() => SearchbarInput)] }) export class Searchbar extends Ion { @@ -118,6 +120,7 @@ export class Searchbar extends Ion { this.blurInput = true; return; } + //console.log("Blurring input"); this.isFocused = false; this.shouldLeftAlign = this.searchbarInput.value && this.searchbarInput.value.trim() != ''; } @@ -127,6 +130,7 @@ export class Searchbar extends Ion { * Clears the input field and triggers the control change. */ clearInput() { + //console.log("Clearing input"); this.searchbarInput.writeValue(''); this.searchbarInput.onChange(''); this.blurInput = false; @@ -139,6 +143,7 @@ export class Searchbar extends Ion { * then calls the custom cancel function if the user passed one in. */ cancelSearchbar(event, value) { + //console.log("Cancel searchbar"); this.clearInput(); this.blurInput = true;