Permalink
Browse files

Call close() function when clicking close button on dialog for select…

…s with menuType="page" rather than falling back to default click handler's window.history.back() call. This fixes issue #1692
  • Loading branch information...
1 parent a5d3c05 commit 9c84088f1d1362d3600801e046195b0c570642bd @pauln committed Jun 1, 2011
Showing with 11 additions and 6 deletions.
  1. +11 −6 js/jquery.mobile.forms.select.js
@@ -162,6 +162,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
button:button,
menuPage:menuPage,
menuPageContent:menuPageContent,
+ menuPageClose:menuPageClose,
screen:screen,
listbox:listbox,
list:list,
@@ -311,12 +312,16 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
});
//close button on small overlays
- self.headerClose.click(function(){
- if( self.menuType == "overlay" ){
- self.close();
- return false;
- }
- })
+ self.headerClose.click(function( event ){
+ self.close();
+ return false;
+ });
+
+ //close button on fullscreen overlays
+ self.menuPageClose.click(function( event ){
+ self.close();
+ return false;
+ });
}
},

0 comments on commit 9c84088

Please sign in to comment.