Skip to content

Commit 9e81b57

Browse files
authored
Merge pull request #1 from kristinalim/fix-modal-wrong_position_when_percent_top_property
fix(modal): Fix vertical position of modal when ".reveal-modal" has % "top" property
2 parents 8fa6cb1 + 93d3d87 commit 9e81b57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modal/modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ angular.module('mm.foundation.modal', ['mm.foundation.transition'])
242242

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

0 commit comments

Comments
 (0)