Skip to content
This repository

Fix issue #1692 #1750

Closed
wants to merge 1 commit into from

2 participants

Paul Nicholls Scott Jehl
Paul Nicholls
pauln commented May 31, 2011

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.

Paul Nicholls 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
Scott Jehl

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

Paul Nicholls
pauln commented June 12, 2011

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.

Scott Jehl scottjehl closed this pull request from a commit July 10, 2011
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
Scott Jehl scottjehl closed this in ada4673 July 10, 2011
Timmy Willison timmywil referenced this pull request from a commit July 10, 2011
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

Showing 1 unique commit by 1 author.

Jun 01, 2011
Paul Nicholls 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
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 11 additions and 6 deletions. Show diff stats Hide diff stats

  1. 17  js/jquery.mobile.forms.select.js
17  js/jquery.mobile.forms.select.js
@@ -162,6 +162,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
162 162
 			button:button,
163 163
 			menuPage:menuPage,
164 164
 			menuPageContent:menuPageContent,
  165
+			menuPageClose:menuPageClose,
165 166
 			screen:screen,
166 167
 			listbox:listbox,
167 168
 			list:list,
@@ -311,12 +312,16 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
311 312
 			});
312 313
 
313 314
 			//close button on small overlays
314  
-			self.headerClose.click(function(){
315  
-				if( self.menuType == "overlay" ){
316  
-					self.close();
317  
-					return false;
318  
-				}
319  
-			})
  315
+			self.headerClose.click(function( event ){
  316
+				self.close();
  317
+				return false;
  318
+			});
  319
+
  320
+			//close button on fullscreen overlays
  321
+			self.menuPageClose.click(function( event ){
  322
+				self.close();
  323
+				return false;
  324
+			});
320 325
 		}
321 326
 	},
322 327
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.