Skip to content

Commit 893fcbe

Browse files
vjrantalperrygovier
authored andcommitted
fix(popover): fix popover position on Internet Explorer
Closes #2861
1 parent b8df44d commit 893fcbe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/angular/service/popover.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ function($ionicModal, $ionicPosition, $document, $window) {
9393
var buttonOffset = $ionicPosition.offset(targetEle);
9494
var popoverWidth = popoverEle.prop('offsetWidth');
9595
var popoverHeight = popoverEle.prop('offsetHeight');
96-
var bodyWidth = $document[0].body.clientWidth;
97-
// clientHeight doesn't work on all platforms for body
96+
// Use innerWidth and innerHeight, because clientWidth and clientHeight
97+
// doesn't work consistently for body on all platforms
98+
var bodyWidth = $window.innerWidth;
9899
var bodyHeight = $window.innerHeight;
99100

100101
var popoverCSS = {

0 commit comments

Comments
 (0)