Merge pull request #478 from chrisaljoudi/master

Safari: remove extra call to popup resize -- now smoother
This commit is contained in:
Raymond Hill 2015-01-11 21:43:01 -05:00
commit 3982bd6de9
1 changed files with 2 additions and 3 deletions

View File

@ -56,10 +56,9 @@ var whenSizeChanges = function(elm, callback) {
var onLoaded = function() { var onLoaded = function() {
var body = document.body, popover = safari.self; var body = document.body, popover = safari.self;
var updateSize = function() { var updateSize = function() {
popover.width = body.offsetWidth; popover.width = body.clientWidth;
popover.height = body.offsetHeight; popover.height = body.clientHeight;
}; };
updateSize();
body.style.position = "relative"; // Necessary for size change detection body.style.position = "relative"; // Necessary for size change detection
whenSizeChanges(body, updateSize); whenSizeChanges(body, updateSize);
}; };