Skip to content

Commit

Permalink
fix(ionNavButtons): multiple ionNavButtons elements align correctly
Browse files Browse the repository at this point in the history
Fixes #930

Uses a `<span>` now for each set buttons in the navbar, instead of a
`<div>`.  This means that the buttons will align correctly instead of
creating new lines for each set of buttons.
  • Loading branch information
ajoslin committed Mar 31, 2014
1 parent f039fc2 commit 58de267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/ext/angular/src/directive/ionicNavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,11 @@ function($ionicViewService, $rootScope, $animate, $compile) {
navBarCtrl.rightButtonsElement :
navBarCtrl.leftButtonsElement;

//Put all of our inside buttons into their own div,
//Put all of our inside buttons into their own span,
//so we can remove them all when this element dies -
//even if the buttons have changed through an ng-repeat or the like,
//we just remove their div parent and they are gone.
var buttons = angular.element('<div>').append(content);
var buttons = angular.element('<span>').append(content);

//Compile buttons inside content so they have access to everything
//something inside content does (eg parent ionicScroll)
Expand Down

0 comments on commit 58de267

Please sign in to comment.