Watch for the `blur` event instead of `keypress`
Pressing "Done" on iOS7 is not triggering ankeypress.
- Id
- db6f67dc4782fb9d8a9adb93a2b2bb8ec3b18546
- Author
- Caio
- Commit time
- 2014-06-05T17:41:46-03:00
Modified app/js/views/searchbox.js
},
// Hide the menubar when pressing <enter> in the searchbox
- // XXX Maybe the `blur` event would be more helpful here. Try later.
- 'keypress input[name="titlefilter"]': function(ev) {
- if (ev.which === 13) {
- $('.navbar-toggle:visible').click();
- }
+ // or clicking 'Done' in the keyboard
+ 'blur input[name="titlefilter"]': function(ev) {
+ $('.navbar-toggle:visible').click();
},
},