Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Issue 1338 #1710

Merged
merged 5 commits into from

3 participants

@gseguin
Collaborator

Fix and unit test

gseguin and others added some commits
@gseguin gseguin Issue #1338
Fixed CSS
e38a58a
@jblas jblas 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
@gseguin gseguin Issue #1338
Smaller CSS fix
37a180a
@gseguin gseguin Issue #1338
Added unit test
ed7eb38
@gseguin gseguin Merge branch 'master' of https://github.com/jquery/jquery-mobile into…
… issue-1338
17000df
@scottjehl

Is this still an issue?

@gseguin gseguin closed this
@gseguin
Collaborator

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

@gseguin gseguin reopened this
@scottjehl

just tested, looking good. Thanks!

@scottjehl scottjehl merged commit e8a973f into jquery:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 25, 2011
  1. @gseguin

    Issue #1338

    gseguin authored
    Fixed CSS
  2. @jblas @gseguin

    Fix for issue 1708 - nightbuild close dialog throwing error

    jblas authored gseguin committed
    - 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.
  3. @gseguin

    Issue #1338

    gseguin authored
    Smaller CSS fix
  4. @gseguin

    Issue #1338

    gseguin authored
    Added unit test
  5. @gseguin
This page is out of date. Refresh to see the latest.
View
7 tests/unit/select/index.html
@@ -239,6 +239,13 @@ <h2 id="qunit-userAgent"></h2>
<option value="overnight">Overnight</option>
</select>
</div>
+
+ <div data-nstest-role="fieldcontain" id="select-long-option-label-container">
+ <select name="select-long-option-label" id="select-long-option-label">
+ <option value="short">Choice 1</option>
+ <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>
+ </select>
+ </div>
</div>
</body>
</html>
View
29 tests/unit/select/select_core.js
@@ -95,4 +95,33 @@
$.testHelper.sequence(sequence, 1000);
});
+ module("Non native menus", {
+ setup: function() {
+ $.mobile.selectmenu.prototype.options.nativeMenu = false;
+ },
+ teardown: function() {
+ $.mobile.selectmenu.prototype.options.nativeMenu = true;
+ }
+ });
+
+ asyncTest( "a large select option should not overflow", function(){
+ // https://github.com/jquery/jquery-mobile/issues/1338
+ var menu, select = $("#select-long-option-label");
+
+ $.testHelper.sequence([
+ function(){
+ // bring up the dialog
+ select.trigger("click");
+ },
+
+ function() {
+ menu = $(".ui-selectmenu-list");
+
+ equal(menu.width(), menu.find("li:nth-child(2) .ui-btn-text").width(), "ui-btn-text element should not overflow")
+ start();
+ }
+ ], 500);
+
+ });
+
})(jQuery);
View
4 themes/default/jquery.mobile.forms.select.css
@@ -16,8 +16,8 @@
label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; }
/*listbox*/
-.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: inline-block; min-height: 1em; }
-.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden; display: block;}
+.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; }
+.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden;}
.ui-selectmenu { position: absolute; padding: 0; z-index: 100 !important; width: 80%; max-width: 350px; padding: 6px; }
.ui-selectmenu .ui-listview { margin: 0; }
Something went wrong with that request. Please try again.