Skip to content

Commit 69b1144

Browse files
Navbar: Fixed styling of button elements
Fixes jquery-archivegh-7606
1 parent 189d2ae commit 69b1144

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

css/structure/jquery.mobile.navbar.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
margin: 0;
2626
border-right-width: 0;
2727
}
28+
.ui-header .ui-navbar li button.ui-btn,
29+
.ui-footer .ui-navbar li button.ui-btn {
30+
margin: 0;
31+
width: 100%;
32+
}
2833
.ui-navbar .ui-btn:focus {
2934
z-index: 1;
3035
}

js/buttonMarkup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ $.fn.buttonMarkup.defaults = {
259259
};
260260

261261
$.extend( $.fn.buttonMarkup, {
262-
initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button"
262+
initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button:not(:jqmData(role='navbar') button)"
263263
});
264264

265265
})( jQuery );

js/widgets/navbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $.widget( "mobile.navbar", {
1818
_create: function() {
1919

2020
var $navbar = this.element,
21-
$navbtns = $navbar.find( "a" ),
21+
$navbtns = $navbar.find( "a, button" ),
2222
iconpos = $navbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined;
2323

2424
$navbar.addClass( "ui-navbar" )

0 commit comments

Comments
 (0)