Skip to content

Commit

Permalink
Merge pull request #1 from kristinalim/fix-modal-wrong_position_when_…
Browse files Browse the repository at this point in the history
…percent_top_property

fix(modal): Fix vertical position of modal when ".reveal-modal" has % "top" property
  • Loading branch information
kristinalim authored Aug 15, 2018
2 parents 8fa6cb1 + 93d3d87 commit 9e81b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ angular.module('mm.foundation.modal', ['mm.foundation.transition'])

// Create a faux modal div just to measure its
// distance to top
var faux = angular.element('<div class="reveal-modal" style="z-index:-1""></div>');
var faux = angular.element('<div class="reveal-modal" style="z-index:-1; display: block;"></div>');
parent.append(faux[0]);
cssTop = parseInt($window.getComputedStyle(faux[0]).top) || 0;
var openAt = calculateModalTop(faux, cssTop);
Expand Down

0 comments on commit 9e81b57

Please sign in to comment.