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

Hidden elements #1

Closed
neocotic opened this issue Mar 12, 2012 · 4 comments
Closed

Hidden elements #1

neocotic opened this issue Mar 12, 2012 · 4 comments
Assignees
Labels
Milestone

Comments

@neocotic
Copy link
Owner

Although detached or generated elements cannot have their styles computed and therefor visibility determined, the style.display property should at least be checked.

Also, it's probably worth while checking the visibility property.

@ghost ghost assigned neocotic Mar 12, 2012
@neocotic
Copy link
Owner Author

I think I'll start off with the simplest approach to this;

properties = ele.style.match /(display|visibility)\s*:\s*[a-z]+/gi
visible    = yes
if properties?
  for property in properties
    visible = not /(none|hidden)\s*$/i.test property

This should, at least for now, detect obvious hidden elements.

@neocotic
Copy link
Owner Author

This works as expected and I'll be sure to unit test it as part of #3.

@skopp
Copy link

skopp commented Dec 14, 2012

You, sir, are a BOSS..
A

BOSS

@skopp
Copy link

skopp commented Dec 14, 2012

sqrt(4096)

SSdkIGxpa2UgdG8gY2hhdCB3aXRoIHlvdS4gQ291bGQgeW91IGRyb3AgbWUgYSBtYWls

aWFtQGdteC5pdA==

neocotic added a commit that referenced this issue Mar 12, 2018
* initial commit

* roll 4.0.0
neocotic added a commit that referenced this issue Mar 12, 2018
* switched to ES5 to avoid having to compile using babel

* simplified import for europa-core

* roll 4.0.0-alpha9 after big rewrite to be compatible with changes to europa-core

* node v6 is now a minimum requirement due to jsdom dependency

* roll 4.0.0-alpha10 after bumping europa-core changes

* roll 4.0.0-alpha11

* roll 4.0.0-alpha12

* roll 4.0.0-alpha13

* roll 4.0.0-alpha14

* roll 4.0.0
neocotic added a commit that referenced this issue Mar 13, 2018
* switched to ES5 to avoid having to compile using babel

* fixed bug with previous Map method reference

* moved to !ninja and another big refactor of code

* added slack notifications to travis

* roll 4.0.0-alpha9

* roll 4.0.0-alpha10

* fixed bug where window not passed to DOMUtilites.isVisible and rolled 4.0.0-alpha11

* roll 4.0.0-alpha12 after fixing issue with detecting styles on detached DOM

* roll 4.0.0-alpha13 after finding bug with inherited visibility on temp wrapper for detatched elements

* simplified plugins and presets

* changed load point for default preset to better support bundlers like rollup

* roll 4.0.0-alpha16 after renaming destroy method to release

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

No branches or pull requests

2 participants