Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3magine opened this issue Oct 21, 2010 · 0 comments
Open

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

3magine opened this issue Oct 21, 2010 · 0 comments

Comments

@3magine
Copy link

3magine commented Oct 21, 2010

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants