Skip to content

Commit

Permalink
ignore resize events when element (e.g. video) enters/exits fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhazov committed May 22, 2017
1 parent 53f9dfa commit 89490ce
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions dist/packery.pkgd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3125,6 +3125,14 @@ proto.resize = function() {
* @returns Boolean
*/
proto.needsResizeLayout = function() {
if (document.webkitFullscreenElement) {
this.fullscreen = true;
return false;
} else if (this.fullscreen) {
this.fullscreen = false;
return false;
}

var size = getSize( this.element );
var innerSize = this._getOption('horizontal') ? 'innerHeight' : 'innerWidth';
return size[ innerSize ] != this.size[ innerSize ];
Expand Down
Loading

0 comments on commit 89490ce

Please sign in to comment.