Skip to content

Loading…

Safari: remove extra call to popup resize -- now smoother #478

Merged
merged 1 commit into from

2 participants

@chrisaljoudi

Pretty much perfect popup-open animation on Safari now. :)

@gorhill gorhill merged commit 3982bd6 into chrisaljoudi:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 3 deletions.
  1. +2 −3 platform/safari/vapi-popup.js
View
5 platform/safari/vapi-popup.js
@@ -35,10 +35,9 @@ var whenSizeChanges = function(elm, callback) {
var onLoaded = function() {
var body = document.body, popover = safari.self;
var updateSize = function() {
- popover.width = body.offsetWidth;
- popover.height = body.offsetHeight;
+ popover.width = body.clientWidth;
+ popover.height = body.clientHeight;
};
- updateSize();
body.style.position = "relative"; // Necessary for size change detection
whenSizeChanges(body, updateSize);
};
Something went wrong with that request. Please try again.