fix(popover): fix popover position on Internet Explorer

Closes #2861
This commit is contained in:
Ville Rantala
2015-01-05 11:54:48 +02:00
committed by perry
parent b8df44d4c4
commit 893fcbec5f

View File

@@ -93,8 +93,9 @@ function($ionicModal, $ionicPosition, $document, $window) {
var buttonOffset = $ionicPosition.offset(targetEle);
var popoverWidth = popoverEle.prop('offsetWidth');
var popoverHeight = popoverEle.prop('offsetHeight');
var bodyWidth = $document[0].body.clientWidth;
// clientHeight doesn't work on all platforms for body
// Use innerWidth and innerHeight, because clientWidth and clientHeight
// doesn't work consistently for body on all platforms
var bodyWidth = $window.innerWidth;
var bodyHeight = $window.innerHeight;
var popoverCSS = {