From 893fcbec5f97eb487d602ab2c19459924c0098b0 Mon Sep 17 00:00:00 2001 From: Ville Rantala Date: Mon, 5 Jan 2015 11:54:48 +0200 Subject: [PATCH] fix(popover): fix popover position on Internet Explorer Closes #2861 --- js/angular/service/popover.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/angular/service/popover.js b/js/angular/service/popover.js index d7a365cb28..53d44fc768 100644 --- a/js/angular/service/popover.js +++ b/js/angular/service/popover.js @@ -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 = {