Fix issue #32 - Clicking a region on map sets focus in search bar; onscreen keyboard covers list

Change-Id: I15703614b5fdb2201f7dcbfd47a5095e033032f3
This commit is contained in:
Santhosh Thottingal
2012-11-13 14:22:10 +05:30
parent 38b870dfe4
commit 8c3b61b1a1
2 changed files with 12 additions and 2 deletions

View File

@@ -147,7 +147,10 @@
} }
this.$menu.show(); this.$menu.show();
this.shown = true; this.shown = true;
this.$languageFilter.focus();
if ( !this.isMobile() ) {
this.$languageFilter.focus();
}
}, },
i18n: function() { i18n: function() {
@@ -321,6 +324,10 @@
isSupported = typeof this.$element[eventName] === 'function'; isSupported = typeof this.$element[eventName] === 'function';
} }
return isSupported; return isSupported;
},
isMobile: function () {
return navigator.userAgent.match( /(iPhone|iPod|iPad|Android|BlackBerry)/ );
} }
}; };

View File

@@ -104,7 +104,10 @@
*/ */
deactivate: function() { deactivate: function() {
this.$element.val( '' ); this.$element.val( '' );
this.$element.focus();
if ( !$.fn.uls.Constructor.prototype.isMobile() ) {
this.$element.focus();
}
this.toggleClear(); this.toggleClear();
this.autofill(); this.autofill();
}, },