Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #575 from raphaelMalie/master
Browse files Browse the repository at this point in the history
Replace dynamic size of overlay with a 100% width and height
  • Loading branch information
Craga89 committed Sep 7, 2013
2 parents 421299d + 98f071f commit 86802ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/modal/modal.css
@@ -1,8 +1,8 @@
/* Modal plugin */
#qtip-overlay{
position: fixed;
left: -10000em;
top: -10000em;
left: 0; top: 0;
width: 100%; height: 100%;
}

/* Applied to modals with show.modal.blur set to true */
Expand Down
16 changes: 2 additions & 14 deletions src/modal/modal.js
Expand Up @@ -79,17 +79,6 @@ OVERLAY = function()
})
.hide();

// Update position on window resize or scroll
function resize() {
var win = $(window);
elem.css({
height: win.height(),
width: win.width()
});
}
$(window).bind('resize'+MODALSELECTOR, resize);
resize(); // Fire it initially too

// Make sure we can't focus anything outside the tooltip
$(document.body).bind('focusin'+MODALSELECTOR, stealFocus);

Expand Down Expand Up @@ -145,10 +134,9 @@ OVERLAY = function()
// Toggle backdrop cursor style on show
elem.toggleClass('blurs', options.blur);

// Set position and append to body on show
// Append to body on show
if(state) {
elem.css({ left: 0, top: 0 })
.appendTo(document.body);
elem.appendTo(document.body);
}

// Prevent modal from conflicting with show.solo, and don't hide backdrop is other modals are visible
Expand Down

0 comments on commit 86802ae

Please sign in to comment.