prathanpum / jquery-loadmask

Automatically exported from code.google.com/p/jquery-loadmask
Other
0 stars 0 forks source link

Delayed Double-masked element does not unmask #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mask element A with a delay of 5000 (to be observable)
2. mask again element A with a delay of 5000
3. unmask element A

What is the expected output? What do you see instead?
I expect the element A never to be masked, or to be unmasked is mask appeared 
(because of delay)
What I see is that enven if unmask is called, the mask will appear seconds 
later...

What version of the product are you using? On what operating system?
Don't know: no revision number is written in the file :/

Original issue reported on code.google.com by Palan...@gmail.com on 3 Aug 2012 at 10:11

GoogleCodeExporter commented 9 years ago
Corrected by adding line 5:
$.fn.mask = function(label, delay){
        $(this).each(function() {
            if(delay !== undefined && delay > 0) {
                var element = $(this);
            $.unmaskElement($(this));
                element.data("_mask_timeout", setTimeout(function() { $.maskElement(element, label)}, delay));
            } else {
                $.maskElement($(this), label);
            }
        });
    };

Original comment by Palan...@gmail.com on 3 Aug 2012 at 12:02

GoogleCodeExporter commented 9 years ago
$.unmaskElement(element);
sorry ^^

Original comment by Palan...@gmail.com on 3 Aug 2012 at 12:02