diff --git a/js/angular/service/popover.js b/js/angular/service/popover.js index 1e7b9b1c50..ea059a2e15 100644 --- a/js/angular/service/popover.js +++ b/js/angular/service/popover.js @@ -101,10 +101,10 @@ function($ionicModal, $ionicPosition, $document, $window) { // make it pop up if (buttonOffset.top + buttonOffset.height + popoverHeight > bodyHeight) { popoverCSS.top = buttonOffset.top - popoverHeight; - popoverEle.removeClass('popover-top').addClass('popover-bottom'); + popoverEle.addClass('popover-bottom'); } else { popoverCSS.top = buttonOffset.top + buttonOffset.height; - popoverEle.removeClass('popover-bottom').addClass('popover-top'); + popoverEle.removeClass('popover-bottom'); } arrowEle.css({ diff --git a/scss/_popover.scss b/scss/_popover.scss index 614a2dfbc7..c6eaf5c9cc 100644 --- a/scss/_popover.scss +++ b/scss/_popover.scss @@ -25,6 +25,7 @@ left: 50%; z-index: $z-index-popover; display: block; + margin-top: 12px; margin-left: -$popover-width / 2; height: $popover-height; width: $popover-width; @@ -40,9 +41,6 @@ border-bottom: 0; } - &.popover-top { - margin-top: 12px; - } &.popover-bottom { margin-top: -12px; } @@ -92,6 +90,7 @@ .popover-arrow { position: absolute; display: block; + top: -17px; width: 30px; height: 19px; overflow: hidden; @@ -108,10 +107,8 @@ @include rotate(-45deg); } } - .popover-top .popover-arrow { - top: -17px; - } .popover-bottom .popover-arrow { + top: auto; bottom: -10px; &:after { top: -6px; @@ -124,6 +121,7 @@ .platform-android { .popover { + margin-top: -32px; background-color: $popover-bg-color-android; box-shadow: $popover-box-shadow-android; @@ -132,9 +130,6 @@ background-color: $popover-bg-color-android; color: #4d4d4d; } - &.popover-top { - margin-top: -32px; - } &.popover-bottom { margin-top: 32px; }