Searchbar v2 onSubmit in ios theme


i trying to access the searchbar in my component.
i´m using subnavbar/searchbar.

in the md theme i get a submit-event on ios theme i dont get a event.

          //do stuff e.g with $$('.searchInput').val().trim();

For submit event to work correctly it must have input type=submit

how can i catch the event on “search” (not on typing what on:search in app.searchbar.create does)

in the old version i could do this on both themes with .submit(function…)

It is recommended to use callbacks for that like onSearch, onClear, etc.

yeah but there we missing an important callback.

for example look at the gmail app:
you can search there your whole mailbox. but he only searches after you press the icon on the corner.
that is made because this search is such a heavy operation you dont wanna do this on type.
we also have an api-search which we wanna trigger only on submit.
(in the 1.* version submit works)

here is a screen when the gmail app begins to search “heavy”

Then, just enable customSearch: true in searchbar settings, add <input type="submit"> in searchbar form and handle all events manually, e.g. $('form.searchbar').on('submit', ...)


i found the “problem”

$$('form.searchbar').on('submit', function()

dont work

$$('form.searchbar').on('submit', function()


(because searchbar is not part of page in ios theme :blush:)