From 11e1bab0e0dee4731615b9f9b084b3fa225019db Mon Sep 17 00:00:00 2001 From: Perry Govier Date: Tue, 9 Dec 2014 13:24:27 -0600 Subject: [PATCH] fix(header): remove bottom border when footer has tabs-top --- js/angular/directive/headerFooterBar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/angular/directive/headerFooterBar.js b/js/angular/directive/headerFooterBar.js index 8df55134c6..0a9d8ad22b 100644 --- a/js/angular/directive/headerFooterBar.js +++ b/js/angular/directive/headerFooterBar.js @@ -118,13 +118,14 @@ function tapScrollToTopDirective() { } function headerFooterBarDirective(isHeader) { - return [function() { + return ['$document',function($document) { return { restrict: 'E', controller: '$ionicHeaderBar', compile: function(tElement, $attr) { tElement.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer'); - if (tElement[0].parentNode.querySelector('.tabs-top')) tElement.addClass('has-tabs-top'); + // android style tabs? if so, remove bottom border for seamless display + if ($document[0].getElementsByClassName('tabs-top')) tElement.addClass('has-tabs-top'); return { pre: prelink }; function prelink($scope, $element, $attr, ctrl) {