mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-24 16:14:44 +00:00
Fixed #107
Back button for customSelect listbox causes navigate to previous page. - Added return false to the click handler attached to the back button in the select code. - Modified the selectors for ui-back in mobilize so they only find back buttons in ui-header that are direct descendants of the ui-page.
This commit is contained in:
parent
5e34201ddc
commit
f1f84ce77d
2 changed files with 3 additions and 2 deletions
|
|
@ -136,6 +136,7 @@ $.fn.customSelect = function(options){
|
|||
//back button
|
||||
listbox.find('.ui-listbox-header a').click(function(){
|
||||
select.trigger('hidemenu');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -334,9 +334,9 @@
|
|||
//add back buttons to headers that don't have them
|
||||
// FIXME make that optional?
|
||||
// TODO don't do that on devices that have a native back button?
|
||||
var backBtn = $el.find('.ui-header a.ui-back');
|
||||
var backBtn = $el.find('.ui-page > .ui-header a.ui-back');
|
||||
if(!backBtn.length){
|
||||
backBtn = jQuery('<a href="#" class="ui-back" data-icon="arrow-l"></a>').appendTo($el.find('.ui-header'));
|
||||
backBtn = jQuery('<a href="#" class="ui-back" data-icon="arrow-l"></a>').appendTo($el.find('.ui-page > .ui-header'));
|
||||
}
|
||||
|
||||
//buttons from links in headers,footers,bars, or with data-role
|
||||
|
|
|
|||
Loading…
Reference in a new issue