Skip to content
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

lightfaceOverlay doesnt go away.. #7

Open
dadbodwazz opened this issue Sep 28, 2011 · 7 comments
Open

lightfaceOverlay doesnt go away.. #7

dadbodwazz opened this issue Sep 28, 2011 · 7 comments

Comments

@dadbodwazz
Copy link

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!

@dadbodwazz
Copy link
Author

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.

dadbodwazz@0f567eb

Cheers

@afoeder
Copy link

afoeder commented Oct 14, 2011

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.

@ericcholis
Copy link

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.

@ericcholis
Copy link

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.

@ericcholis
Copy link

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.

@ericcholis
Copy link

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.

@afoeder
Copy link

afoeder commented Mar 19, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants