Open ionitron-bot[bot] opened 5 years ago
Original issue by @Bloggerschmidt on 2017-01-11T14:13:22Z
Ionic version: (check one with "x") [ ] 1.x [x] 2.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Clicking the clear button in <ion-searchbar> (the x at the end) (ionClear) is calling a function twice (for the event types 'mousedown' and 'click').
<ion-searchbar>
(ionClear)
Expected behavior:
(ionClear) should call only once (for event type 'click' or (!) 'mousedown')
Steps to reproduce:
ionic start --v2 myApp blank
Related code:
home.html
<ion-header> <ion-navbar> <ion-title> Ionic Blank </ion-title> </ion-navbar> </ion-header> <ion-content padding> <ion-searchbar primary [(ngModel)]="address" (ionClear)="clearSearch($event)" ></ion-searchbar> </ion-content>
home.ts
import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { address = ''; constructor(public navCtrl: NavController) { } clearSearch(e) { console.log('clearSearch', e); } }
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
ionic info
Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.47 ios-deploy version: 1.9.0 ios-sim version: 5.0.13 OS: macOS Sierra Node Version: v7.4.0 Xcode version: Xcode 8.2.1 Build version 8C1002
Any updates on this the ionClear is calling two events mousedown and click resulting in keyboard appearing twice
Original issue by @Bloggerschmidt on 2017-01-11T14:13:22Z
Ionic version: (check one with "x") [ ] 1.x [x] 2.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Clicking the clear button in
<ion-searchbar>
(the x at the end)(ionClear)
is calling a function twice (for the event types 'mousedown' and 'click').Expected behavior:
(ionClear)
should call only once (for event type 'click' or (!) 'mousedown')Steps to reproduce:
Related code:
home.html
home.ts
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):