Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix issue #1692 #1750

Closed
wants to merge 1 commit into from

2 participants

@pauln

Call close() function when clicking close button on dialog for selects with menuType="page" rather than falling back to default click handler's window.history.back() call.

@pauln pauln 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
9c84088
@scottjehl

Thanks! Does this work for clicking either the back button or the custom close button? It'll need to support both in the end.

@pauln

It only works when using the custom close button at present - I haven't yet familiarised myself with enough of the jQuery Mobile code to have worked out the best way to hook into the chain of events triggered from the browser back button to implement this there.

@scottjehl scottjehl closed this pull request from a commit
scottjehl abstracted out some of the page hide behavior to fix issues with the …
…close button not returning focus to the button after closing. Also fixes an issue where a full page custom menu would open as a misplaced small custom menu the second time it opens (if the menu was closed via the custom close button). Fixes #1618. Fixes #1692. Fixes #1750.
ada4673
@scottjehl scottjehl closed this in ada4673
@timmywil timmywil referenced this pull request from a commit
scottjehl abstracted out some of the page hide behavior to fix issues with the …
…close button not returning focus to the button after closing. Also fixes an issue where a full page custom menu would open as a misplaced small custom menu the second time it opens (if the menu was closed via the custom close button). Fixes #1618. Fixes #1692. Fixes #1750.
adea325
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 1, 2011
  1. @pauln

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

    pauln authored
    …s with menuType="page" rather than falling back to default click handler's window.history.back() call. This fixes issue #1692
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 6 deletions.
  1. +11 −6 js/jquery.mobile.forms.select.js
View
17 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;
+ });
}
},
Something went wrong with that request. Please try again.