Skip to content
This repository

Issue 1338 #1710

Merged
merged 5 commits into from almost 3 years ago

3 participants

Ghislain Seguin Scott Jehl Kin Blas
Ghislain Seguin
Collaborator
gseguin commented May 25, 2011

Fix and unit test

and others added some commits May 25, 2011
Ghislain Seguin Issue #1338
Fixed CSS
e38a58a
Kin Blas Fix for issue 1708 - nightbuild close dialog throwing error
- Check the returned active object to see if it is valid before attempting to extract the transition out of it. Default to $.mobile.defaultDialogTransition if there is no active object.
0012657
Ghislain Seguin Issue #1338
Smaller CSS fix
37a180a
Ghislain Seguin Issue #1338
Added unit test
ed7eb38
Ghislain Seguin Merge branch 'master' of https://github.com/jquery/jquery-mobile into…
… issue-1338
17000df
Scott Jehl

Is this still an issue?

Ghislain Seguin gseguin closed this June 24, 2011
Ghislain Seguin
Collaborator

I believe so, check http://jsbin.com/isizo5/6

Ghislain Seguin gseguin reopened this June 24, 2011
Scott Jehl

just tested, looking good. Thanks!

Scott Jehl scottjehl merged commit e8a973f into from June 24, 2011
Scott Jehl scottjehl closed this June 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 5 unique commits by 2 authors.

May 25, 2011
Ghislain Seguin Issue #1338
Fixed CSS
e38a58a
Kin Blas Fix for issue 1708 - nightbuild close dialog throwing error
- Check the returned active object to see if it is valid before attempting to extract the transition out of it. Default to $.mobile.defaultDialogTransition if there is no active object.
0012657
Ghislain Seguin Issue #1338
Smaller CSS fix
37a180a
Ghislain Seguin Issue #1338
Added unit test
ed7eb38
Ghislain Seguin Merge branch 'master' of https://github.com/jquery/jquery-mobile into…
… issue-1338
17000df
This page is out of date. Refresh to see the latest.
7  tests/unit/select/index.html
@@ -239,6 +239,13 @@ <h2 id="qunit-userAgent"></h2>
239 239
 			<option value="overnight">Overnight</option>
240 240
 		</select>
241 241
 	</div>
  242
+
  243
+	<div data-nstest-role="fieldcontain" id="select-long-option-label-container">
  244
+		<select name="select-long-option-label" id="select-long-option-label">
  245
+			<option value="short">Choice 1</option>
  246
+			<option value="long">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</option>
  247
+	    </select>
  248
+	</div>
242 249
 </div>
243 250
 </body>
244 251
 </html>
29  tests/unit/select/select_core.js
@@ -95,4 +95,33 @@
95 95
 		$.testHelper.sequence(sequence, 1000);
96 96
 	});
97 97
 
  98
+	module("Non native menus", {
  99
+		setup: function() {
  100
+			$.mobile.selectmenu.prototype.options.nativeMenu = false;
  101
+		},
  102
+		teardown: function() {
  103
+			$.mobile.selectmenu.prototype.options.nativeMenu = true;
  104
+		}
  105
+	});
  106
+
  107
+	asyncTest( "a large select option should not overflow", function(){
  108
+		// https://github.com/jquery/jquery-mobile/issues/1338
  109
+		var menu, select = $("#select-long-option-label");
  110
+
  111
+		$.testHelper.sequence([
  112
+			function(){
  113
+				// bring up the dialog
  114
+				select.trigger("click");
  115
+			},
  116
+
  117
+			function() {
  118
+				menu = $(".ui-selectmenu-list");
  119
+
  120
+				equal(menu.width(), menu.find("li:nth-child(2) .ui-btn-text").width(), "ui-btn-text element should not overflow")
  121
+				start();
  122
+			}
  123
+		], 500);
  124
+
  125
+	});
  126
+
98 127
 })(jQuery);
4  themes/default/jquery.mobile.forms.select.css
@@ -16,8 +16,8 @@
16 16
 label.ui-select { font-size: 16px; line-height: 1.4;  font-weight: normal; margin: 0 0 .3em; display: block; }
17 17
 
18 18
 /*listbox*/
19  
-.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: inline-block; min-height: 1em; }
20  
-.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden; display: block;}
  19
+.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; }
  20
+.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden;}
21 21
 
22 22
 .ui-selectmenu { position: absolute; padding: 0; z-index: 100 !important; width: 80%; max-width: 350px; padding: 6px; }
23 23
 .ui-selectmenu .ui-listview { margin: 0; }
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.