Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue 1338 #1710

Merged
merged 5 commits into from

3 participants

Ghislain Seguin Scott Jehl Kin Blas
Ghislain Seguin
Owner

Fix and unit test

gseguin and others added some commits
Ghislain Seguin gseguin Issue #1338
Fixed CSS
e38a58a
Kin Blas 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
Ghislain Seguin gseguin Issue #1338
Smaller CSS fix
37a180a
Ghislain Seguin gseguin Issue #1338
Added unit test
ed7eb38
Ghislain Seguin gseguin 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
Ghislain Seguin
Owner

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

Ghislain Seguin gseguin reopened this
Scott Jehl

just tested, looking good. Thanks!

Scott Jehl scottjehl merged commit e8a973f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 25, 2011
  1. Ghislain Seguin

    Issue #1338

    gseguin authored
    Fixed CSS
  2. Kin Blas Ghislain Seguin

    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. Ghislain Seguin

    Issue #1338

    gseguin authored
    Smaller CSS fix
  4. Ghislain Seguin

    Issue #1338

    gseguin authored
    Added unit test
  5. Ghislain Seguin
This page is out of date. Refresh to see the latest.
7 tests/unit/select/index.html
View
@@ -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>
29 tests/unit/select/select_core.js
View
@@ -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);
4 themes/default/jquery.mobile.forms.select.css
View
@@ -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.