Closed lucaspinto closed 11 years ago
I add the same change for the width.
Thanks for this. I'm just trying to reproduce it myself. My test page is ok if I scroll down before or after the modal appears :
http://www.garethelms.org/demo/backbone-js-modal-dialog/demo.html
Do you have a test page with this problem? I'll experiment more tonight.
I've just noticed that the blanket doesn't cover the bottom when I increase the height of the window after bringing up the dialog is this what you mean?
Unfortunately, I don't have this page online right now. My page size is indeed extended after I open it, but before I bring up the dialog, and I guess it's why jQuery doesn't give me back a proper value. see: https://skitch.com/medkmedk/eu7dy/pixbob
Makes sense now, I'll look into and see if there's a jQuery way, otherwise I'll merge as is. Thanks
Ok. You're welcome ;)
I wonder if this is an inherent problem with modal dialogs when the background is scrollable? Can you try it with bodyOverflowHidden true and let me if this suits your needs? It stops the page being scrollable while the modal dialog is visible. Twitter do something similar when you compose a tweet.
view.render().showModal( {bodyOverflowHidden:true});
It would be good if I could see your problem first hand to make sure I know what your problem is.
Indeed, we can't scroll anymore with this option and that'll be enough for me.
I'm sorry, I don't say a way I could let you access the application where I meet this issue or even a part/copy of it.
When you use jQuery, the value you get is actually the window height. So that when you scroll down, the blank doesn't cover the page anymore.
So if you want to cover the whole page, you'll have to use document.height.