You can clone with
HTTPS or Subversion.
First off, LOVE this library. It's fantastic. So I thank you for that!
I've recently updated to MooTools 1.4. Lightface appears to work flawlessly except for one little snag.
Once its loaded (using mostly the request and iframe extensions here) , the element with class="lightfaceOverlay" doesn't get all the same inline css as when using moo-tools 1.2.
visibility: hidden is not added.
Top:0, and opacity: 0; are added just not the visibility attribute.
I've gone back and tested with a fresh download of MooTools 1.3, and it works fine, just not with 1.4.
Ive had a hunt through the code, but cannot find any references to visibility, so I'm assuming its part of a MooTools event such as hide() or fade() which has changed within MooTools itself.
Are you able to help me with this, and even just point out what I need to do to get the visibility attribute back into the overlay once it's loaded.
Don't know whats changed in 1.4, tried tracing it back through mootools core - got lost at sea.
Added this change to work around it.
Hey khandieyea, thanks for your post, exactly got also in trouble with this issue. I also discovered so far that visibility:hidden is not added. If I find out what's wrong I'll get back here.
I'm noticing this issue too. This makes the buttons unusable as well.
In regards to the patch that khandieyea created, I'm not sure that it correctly addresses the issue. Under MooTools 1.2 and 1.3 when not using overlayAll (overlayAll = false) the visibility of the lightfaceOverlay is hidden when it is created, even before the open() method is called. In 1.4x the visibility style isn't set at all.
You'll notice that the same is true for the lightface parent element as well. Under 1.4, visibility is not set when it is injected into the page, 1.2 and 1.3 have visibility set to hidden when it is created.
I'm kind of live-commenting while I debug this.
Looks like the culprit comes down to the way 1.4 sets visibility when opacity is set. In 1.4, the following function is run when opacity is set:
In 1.3, the following setter and getter are run when modifying opacity:
So, something isn't firing the setVisibility function under 1.4.
I'm pretty sure I have a working (temporary) fix for this issue:
In addition to khandieyea's changes, I added similar functionality to this.box and this.overlay to ensure that the visibility is set when the opacity changes.
Small update to the above commit:
this.overlay needs to have visibility when used with things like LightFace.Request, to show the loading animation.
just mentioning #13 here, looks like these are duplicates of each other.
[BUGFIX] Fixed overlay behavior
Related: #7, #13