1. #1
    Sencha User joejernst's Avatar
    Join Date
    Apr 2009
    Posts
    32
    Vote Rating
    0
    joejernst is on a distinguished road

      0  

    Default What event should fire when using the clearIcon for searchfield?

    What event should fire when using the clearIcon for searchfield?


    When I click on the clearIcon (the "x" at the right end of the field) of a searchfield, I would expect the change event to fire, but it doesn't. Is there any other way to capture when a user clears the field using that icon?

    There also appears to be some CSS issues with the searchfield in pr2. It changes size and shape when text is entered into it, and the cursor does not change into an arrow when hovering over the "x".

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,812
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    HTML5 spec states that the HTML5 search field will fire the 'search' event when the clear icon is clicked/tapped on.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User joejernst's Avatar
    Join Date
    Apr 2009
    Posts
    32
    Vote Rating
    0
    joejernst is on a distinguished road

      0  

    Default


    Are HTML5 events distinctly separate from Ext events? I'm looking at the list of events for Ext.field.Search and I don't see one called "search".

    How would I capture that event in my Controller? Right now I am listening for the 'change' event (as documented in the API docs). It works fine when text is entered and the user tabs out of the field, but not when the icon is clicked to clear the search term.

    I'm using Chrome on my desktop.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,812
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Yes, we listen to some when we need to do things and fire them on the component level but there are more events being fired on the DOM element than are being fired on the component by ST2.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread