Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

lightfaceOverlay doesnt go away.. #7

Open
khandieyea opened this Issue · 7 comments

3 participants

Warren Adrian Föder Eric Cholis
Warren

Heya,

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.

Many Thanks!

Warren

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.

khandieyea@0f567eb

Cheers

Adrian Föder

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.

Eric Cholis

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.

Eric Cholis

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:
https://github.com/mootools/mootools-core/blob/master/Source/Element/Element.Style.js#L29

In 1.3, the following setter and getter are run when modifying opacity:
https://github.com/mootools/mootools-core/blob/1.3x/Source/Element/Element.Style.js#L40

So, something isn't firing the setVisibility function under 1.4.

Eric Cholis

I'm pretty sure I have a working (temporary) fix for this issue:

ericcholis@902b741

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.

Eric Cholis

Small update to the above commit:

ericcholis@318a804

this.overlay needs to have visibility when used with things like LightFace.Request, to show the loading animation.

Adrian Föder

just mentioning #13 here, looks like these are duplicates of each other.

Adrian Föder afoeder referenced this issue from a commit
Adrian Föder afoeder [BUGFIX] Fixed overlay behavior
Related: #7, #13
044c332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.