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

Expose - $.mask.isLoaded() is not accurate on some situation. #90

Closed
ddouble opened this Issue Jun 23, 2010 · 1 comment

Comments

Projects
None yet
2 participants
@ddouble

ddouble commented Jun 23, 2010

I use $.mask.isLoaded() detect if $.mask is closed, but result was not correct.

I find this function depend on animate time of mask & computer's speed. see Expose source code:

Because mask.fadeOut is asynchronous, the loaded variable would be set before mask.fadeOut finished. When someone load Expose when $.mask.isLoaded() return false, he will not get desired result.


Expose source code: v 1.2.3
Line:165

        close: function() {
            if (loaded) {
                
                // onBeforeClose
                if (call(config.onBeforeClose) === false) { return this; }
                    
                mask.fadeOut(config.closeSpeed, function()  {                    
                    call(config.onClose);                   
                    if (exposed) {
                        exposed.css({zIndex: overlayIndex});
                    }
                });
                
                // unbind various event listeners
                $(document).unbind("keydown.mask");
                mask.unbind("click.mask");
                $(window).unbind("resize.mask");
    
                loaded = false;
            }
            
            return this; 
        },


@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Jul 22, 2010

Contributor

on the next version you can ask

isLoaded(true)

if you need to know whether the mask is fully loaded (after the fading animation). this is similar to current implementation of tooltip. see the commit:

http://github.com/jquerytools/jquerytools/commit/50dba62f74e257e7c904145718ac9399baf9115e

Contributor

tipiirai commented Jul 22, 2010

on the next version you can ask

isLoaded(true)

if you need to know whether the mask is fully loaded (after the fading animation). this is similar to current implementation of tooltip. see the commit:

http://github.com/jquerytools/jquerytools/commit/50dba62f74e257e7c904145718ac9399baf9115e

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment