Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

StickyWin.Modal - Modal 100% height not working #74

Open
3magine opened this Issue · 0 comments

1 participant

3magine, Inc.
3magine, Inc.

When window has no vertical scroll and I popup StickyWIn.Modal with contents that create vertical scroll bars, modal window does not stretch to 100% height.

I noticed that on clientcide StickyWin.modal demo (http://www.clientcide.com/wiki/cnet-libraries/07-ui/07-stickywin.modal) it is using modalizer (which is depreciated) and the position of modal is set to 'fixed' (which works perfectly), and the new script is using Mask which sets the position to absolute and has an option to correct the missing vertical scroll however Modal window is displayed before stickywin and at that point in time there is no scroll therefore it is not 100% height.

I was able to temporary fix it by overriding StickyWin.Modal.show method from:

function(showModal){
if ($pick(showModal, this.options.modalize))
this.mask.show();
this.parent();
}

to:

function(showModal){
if ($pick(showModal, this.options.modalize))
this.mask.show().element.setStyle('position','fixed');
this.parent();
}

Hope that clarifies the issue.

[update]
one more usefull line of code to add above this.parent(); would be:
window.addEvent('resize', this.position.bind(this));

So my final fix looks like this:

StickyWin.Modal.implement({
show: function(showModal){
if ($pick(showModal, this.options.modalize)) this.mask.show().element.setStyle('position','fixed');
window.addEvent('resize', this.position.bind(this));
this.parent();
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.