Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Equalizer] equalizeOnStack callout issue #8671

Closed
designerno1 opened this issue Apr 26, 2016 · 0 comments
Closed

[Equalizer] equalizeOnStack callout issue #8671

designerno1 opened this issue Apr 26, 2016 · 0 comments

Comments

@designerno1
Copy link
Contributor

designerno1 commented Apr 26, 2016

equalize on stack not working if watched in callout

as of:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop
https://developer.mozilla.org/en-US/docs/Web/API/HTMLelement/offsetParent

_isStacked() {
  return this.$watched[0].offsetTop !== this.$watched[1].offsetTop;
}

offsetTop is the value related to the offsetParent and because callout has position: relative; ist the offsetTop related to the callout in my case the same on the first and second

maybe using getBoundingClientRect() or offset().top?

https://codepen.io/designerno1/full/JXaMaw/

designerno1 added a commit to designerno1/foundation-sites that referenced this issue Apr 26, 2016
use getBoundingClintRect().top to detect stack
kball added a commit that referenced this issue Apr 26, 2016
@kball kball closed this as completed Apr 26, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants