wnielson / sencha-SlideNavigation

Sliding side menu for Sencha Touch apps. Inspired by Facebook's mobile app menu.
http://wnielson.github.com/sencha-SlideNavigation/
MIT License
264 stars 115 forks source link

Searchfield gets 'autofocus' when the slideButton is clicked #7

Closed sgtdck closed 11 years ago

sgtdck commented 11 years ago

I have the slidenavigation set-up as the example, with the searchfield in the list toolbar (uncommented it).

When clicking the slideButton, the menu slides open, but on mobile devices the searchfield gets 'autofocus', so the keyboard pops up and the cursor is on the searchfield. Is there any way around it? I've tried modifying the setClosed() function in the slidenavigation, to disable the searchfield while the slidenavigation is closed:

    var searchField = this.list.query('searchfield')[0];
    if(searchField) {
        searchField.setReadOnly(closed);
        Ext.DomQuery.selectNode('div[class*=x-field-search] input[class*=x-input-search]').readOnly = closed;
    }

but unfortunately to no effect (disabling is possible, but enabling doesn't work).

I'm also experiencing this on clickable elements in the container (such as hyperlinks), after a list item has been tapped.

This only occurs when the 'underlying' element is (or ends up after animation) exactly below the point tapped.

Any ideas?

Apart from the above, absolutely love your script! brilliant.

wnielson commented 11 years ago

Thanks for the report on this. Hope this fixes the issue for you.