diff --git a/core/src/components/searchbar/searchbar.tsx b/core/src/components/searchbar/searchbar.tsx index 43fabbe02c..461f797b18 100644 --- a/core/src/components/searchbar/searchbar.tsx +++ b/core/src/components/searchbar/searchbar.tsx @@ -184,9 +184,15 @@ export class Searchbar { * the clearInput function doesn't want the input to blur * then calls the custom cancel function if the user passed one in. */ - private cancelSearchbar() { + private cancelSearchbar(ev?: Event) { + if (ev) { + ev.preventDefault(); + ev.stopPropagation(); + } this.ionCancel.emit(); this.clearInput(); + + this.nativeInput.blur(); } /** @@ -332,7 +338,8 @@ export class Searchbar {