Skip to content

Commit 2a0a230

Browse files
committed
Fixes jquery-archive#3697.ui-corner-top/.ui-corner-bottom are no longer incorrectly applied to the first and last elements in a controlgroup within a dialog page.
1 parent 9dcc864 commit 2a0a230

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

js/jquery.mobile.dialog.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ $.widget( "mobile.dialog", $.mobile.widget, {
2727
// Set aria role
2828
$el
2929
.wrapInner( dialogWrap )
30-
.find( ":jqmData(role='header')" )
31-
.prepend( headerCloseButton )
32-
.end()
33-
.find(':first-child')
34-
.addClass( "ui-corner-top" )
35-
.end()
36-
.find( ":last-child" )
37-
.addClass( "ui-corner-bottom" );
30+
.children()
31+
.find( ":jqmData(role='header')" )
32+
.prepend( headerCloseButton )
33+
.end()
34+
.children( ':first-child')
35+
.addClass( "ui-corner-top" )
36+
.end()
37+
.children( ":last-child" )
38+
.addClass( "ui-corner-bottom" );
3839

3940
// this must be an anonymous function so that select menu dialogs can replace
4041
// the close method. This is a change from previously just defining data-rel=back

0 commit comments

Comments
 (0)