Permalink
Browse files

Navbar: Fixed styling of button elements

Fixes gh-7606
  • Loading branch information...
1 parent 516b791 commit a6b00e7895197c33d401d7368dda9f109c9e52af @jaspermdegroot jaspermdegroot committed Aug 14, 2014
Showing with 7 additions and 2 deletions.
  1. +5 −0 css/structure/jquery.mobile.navbar.css
  2. +1 −1 js/jquery.mobile.buttonMarkup.js
  3. +1 −1 js/widgets/navbar.js
@@ -25,6 +25,11 @@
margin: 0;
border-right-width: 0;
}
+.ui-header .ui-navbar li button.ui-btn,
+.ui-footer .ui-navbar li button.ui-btn {
+ margin: 0;
+ width: 100%;
+}
.ui-navbar .ui-btn:focus {
z-index: 1;
}
@@ -259,7 +259,7 @@ $.fn.buttonMarkup.defaults = {
};
$.extend( $.fn.buttonMarkup, {
- initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button"
+ initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button:not(:jqmData(role='navbar') button)"
});
})( jQuery );
@@ -18,7 +18,7 @@ $.widget( "mobile.navbar", {
_create: function() {
var $navbar = this.element,
- $navbtns = $navbar.find( "a" ),
+ $navbtns = $navbar.find( "a, button" ),
iconpos = $navbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined;
$navbar.addClass( "ui-navbar" )

0 comments on commit a6b00e7

Please sign in to comment.