Skip to content

Commit 2e1bb4b

Browse files
committed
fix(searchbar): ENTER does not clear when it is inside a form
fixes #7010
1 parent eb2b879 commit 2e1bb4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/searchbar/searchbar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ import { Debouncer } from '../../util/debouncer';
3030
selector: 'ion-searchbar',
3131
template:
3232
'<div class="searchbar-input-container">' +
33-
'<button ion-button (click)="cancelSearchbar($event)" (mousedown)="cancelSearchbar($event)" clear color="dark" class="searchbar-md-cancel">' +
33+
'<button ion-button (click)="cancelSearchbar($event)" (mousedown)="cancelSearchbar($event)" clear color="dark" class="searchbar-md-cancel" type="button">' +
3434
'<ion-icon name="arrow-back"></ion-icon>' +
3535
'</button>' +
3636
'<div #searchbarIcon class="searchbar-search-icon"></div>' +
3737
'<input #searchbarInput [(ngModel)]="_value" [attr.placeholder]="placeholder" (input)="inputChanged($event)" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" class="searchbar-input">' +
38-
'<button ion-button clear class="searchbar-clear-icon" (click)="clearInput($event)" (mousedown)="clearInput($event)"></button>' +
38+
'<button ion-button clear class="searchbar-clear-icon" (click)="clearInput($event)" (mousedown)="clearInput($event)" type="button"></button>' +
3939
'</div>' +
40-
'<button ion-button #cancelButton [tabindex]="_isActive ? 1 : -1" clear (click)="cancelSearchbar($event)" (mousedown)="cancelSearchbar($event)" class="searchbar-ios-cancel">{{cancelButtonText}}</button>',
40+
'<button ion-button #cancelButton [tabindex]="_isActive ? 1 : -1" clear (click)="cancelSearchbar($event)" (mousedown)="cancelSearchbar($event)" class="searchbar-ios-cancel" type="button">{{cancelButtonText}}</button>',
4141
host: {
4242
'[class.searchbar-has-value]': '_value',
4343
'[class.searchbar-active]': '_isActive',

0 commit comments

Comments
 (0)