Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 8062bf0

Browse files
author
ehynds
committed
finish merge of select_event_bubbling or whatever i called that branch
2 parents e2eb9e9 + 12f011b commit 8062bf0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

js/jquery.mobile.forms.select.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
124124
//button events
125125
button.bind( $.support.touch ? "touchstart" : "click", function(event){
126126
self.open();
127-
return false;
127+
event.preventDefault();
128128
});
129129

130130
//events for list items
131-
list.delegate("li:not(.ui-disabled)", "click", function(){
131+
list.delegate("li:not(.ui-disabled)", "click", function(event){
132132
//update select
133133
var newIndex = list.find( "li" ).index( this ),
134134
prevIndex = select[0].selectedIndex;
@@ -144,14 +144,14 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
144144

145145
//hide custom select
146146
self.close();
147-
return false;
147+
event.preventDefault();
148148
});
149149

150150
//events on "screen" overlay
151-
screen.click(function(){
151+
screen.click(function(event){
152152
self.close();
153-
return false;
154-
});
153+
event.preventDefault();
154+
});
155155
},
156156

157157
_buildList: function(){

0 commit comments

Comments
 (0)