> Well you see the thing is you have both <body> and <html> you need to turn
> off the overflow on in IE...yes stupid I know...
> 
oh yeah, of course. works now

> Also using width: screen.width, height: screen.height is silly also cause
> you are assuming the user has the browser window fully open.  I just use
> "100%" for the width and height so it just consumes all the browser and then
> hide the scrollbars.
> 

sorry - this 100% is not being used for a reason:
http://groups.google.com/group/mootools-users/browse_thread/thread/9d614fa897cd4f75/de61e01e8c0c9292?lnk=gst&q=modal+ie#

this is the original thread that made me want to refactor the code. as
shown here, and you can test it - if a page is too tall and hence, the
layer itself, IE can't apply the opacity filter to it and it makes it a
solid colour instead.

which is why it's not silly to set it to through maximum possible
resolution 

new code is:

    toggleModal: function() {
        // modal view for the whole screen
        if (this.modal) {
            this.container.setStyle("overflow", this.flowStyles.body);

            if (Browser.Engine.trident)
                $(document.html).setStyle("overflow", this.flowStyles.html);

            this.modal.dispose();
            delete this.modal;
            return false;
        }

        this.flowStyles = {
            body: this.container.getStyle("overflow"),
            html: $(document.html).getStyle("overflow")
        };

        this.container.setStyle("overflow", "hidden");

        if (Browser.Engine.trident)
            $(document.html).setStyle("overflow", "hidden");

        this.modal = new Element("div", {
            styles: {
                position: "absolute",
                top: 0,
                left: 0,
                width: "100%",
                height: "100%",
                background: this.options.modal.background,
                zIndex: this.options.modal.zIndex
            },
            opacity: this.options.modal.opacity,
            events: this.options.modal.events
        }).inject(this.container);

        return this.modal; // can chain into it.
    }

and it works whilst the modal is on. however, when overflow is being
restored to what it was, scrollbars appear :/ sigh... 

> Also there is a bug in your code where if you open an item and then close it
> and then open it...you only get the close button coming up.

Yeah,  i know - was having trouble with the cache system. works now 

-- 
Dimitar Christoff <[email protected]> - http://fragged.org/

Reply via email to