This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// doesn't work: when keyboard is shown, back button hides keyboard. hitting back button again exits app w/o triggering this event | |
$(document).on('backbutton', function () { | |
console.log('back pressed'); | |
if ($.mobile.activePage.find('.suggestions').children().length > 0) { | |
console.log('hide suggestions'); | |
var $input = $.mobile.activePage.find('input'); | |
$input.val(''); | |
$input.autocomplete('clear'); |