Page 1 of 1

Chrome Dev tools & visibility:hidden

Posted: Mon Dec 16, 2013 6:06 am
by mahks
Re : Chrome Dev tools

On my page I have a bunch of full screen iframes that I set to visibility:hidden when not needed.

If I r-click on the page & select inspect element, the top most of these iframes gets "selected" in the elements tab of Dev tools.

Is there a way around this, or do I have to reorder my tags?

In firefox/firebug the selection depends on what is actually visible, (same as what the user sees)

Re: Chrome Dev tools & visibility:hidden

Posted: Mon Dec 16, 2013 6:31 am
by MikuzA
Hello,

haven't tested but you might try playing around with the z-index, or similiar weight so that you 'push' the hidden frames behind the content and when you wish to unhidden them, change also the z-index.

Hope this helps :)

br,
Michael

Re: Chrome Dev tools & visibility:hidden

Posted: Mon Dec 16, 2013 10:45 am
by mahks
Yes, z-Index would do that, but the iframes are in a specific order needed for the site to work.

I would hope I do not have to redesign the site to use a dev-tool!

Why would they have it so hidden objects are not ... um ... hidden?
I suspect I'm just missing something ... (being new to chrome and all)

Re: Chrome Dev tools & visibility:hidden

Posted: Mon Dec 16, 2013 11:40 am
by Winawer
Have you tried display:none?

Re: Chrome Dev tools & visibility:hidden

Posted: Mon Dec 16, 2013 11:49 am
by mahks
The point is to not have to change the code to inspect the HTML with a tool.

Re: Chrome Dev tools & visibility:hidden

Posted: Mon Dec 16, 2013 2:23 pm
by mahks
Another issue is that there seems to be no way to fully expand a tag in the HTML view.

I can't access the element I can see on the page, because there are hidden( :lol: ) objects in front of them.
So I go into the HTML viewer and have to drill down a dozen clicks to get to the element I want.

Can this be the way it is? :(

Loaded firebug lite, seems extremely crippled compared to regular firebug and is of no help to me for this.

Is there any other tool anyone can suggest?

Re: Chrome Dev tools & visibility:hidden

Posted: Tue Dec 17, 2013 1:34 am
by Jackolantern
Hmm...I have not come across this, even when using a ton of hidden objects in my MUD.

So this is not an issue with how the page is running? It is only an issue with debugging using the Chrome Dev Tools?

And just to be sure I understand it, you can't click on the element you want because CDT are still making the hidden elements laying over the desirable element clickable, but the elements are not selectable in the "Elements" tab because they are hidden? Or am I way off here?

Re: Chrome Dev tools & visibility:hidden

Posted: Tue Dec 17, 2013 1:59 am
by mahks
No, it is right-click in the browser window (on an element I can see) then "inspect element" in the context menu, that is the main issue. The hidden iframe generates a mouse event to devtools so it gets displayed/selected in the dev-tools elements panel rather than the object I appear to click on.

I asked on stack overflow : http://stackoverflow.com/questions/2060 ... ork-around

A chrome guy agreed there was an issue and created a bug report : https://code.google.com/p/chromium/issu ... ?id=328856

Re: Chrome Dev tools & visibility:hidden

Posted: Tue Dec 17, 2013 2:17 am
by Jackolantern
Oh, interesting. Yeah, I have not come across that issue before, but I hope it gets resolved, particularly since it appears to be a bug in the dev tools.

Re: Chrome Dev tools & visibility:hidden

Posted: Fri Dec 20, 2013 9:04 am
by mahks
Looks like the problem is not dev tools, seems Chrome has issues with iframe & visibility ... a hidden iframe isn't.

I tried to change my iframes to using display rather than visibility, got all swapped, then realized why I used visibility in the first place! Arrrgghh.
Display collapses the dimensions of an object, visibility does not. So you can't use display:none and referrer to things like clientWidth and scrollTo.

Unless I am missing something?