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

Already on GitHub? Sign in to your account

Fix reading zIndex under chrome #122

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

For me on chrome 26 the object returned by getComputedStyle() has
properties with names as in css ('z-index') not like the javascript
style properties ('zIndex') so we need to convert to look up the
z-index correctly.

Fix reading zIndex under chrome
For me on chrome 26 the object returned by getComputedStyle() has
properties with names as in css ('z-index') not like the javascript
style properties ('zIndex') so we need to convert to look up the
z-index correctly.
Owner

JamesMGreene commented Mar 22, 2013

Thanks for the PR! I was aware of this issue with getComputedStyle but haven't had the time to address it yet, so thank you for beating me to it. :)

That said:

  1. I cannot personally merge this yet as our build doesn't currently work on Windows (see #71), so all of my efforts are being invested in resolving that first so that I can do legit PR testing, etc.
  2. So, we'll probably have to wait for @jonrohan to get back from his vacation to merge this, unless I finish the cross-platform-including-Windows build before then.
  3. When @jonrohan and I talked about this previously, our decision was to provide the strings in their native CSS format (e.g. "z-index") and then convert them to their camel-cased-and-sometimes-crazy alternative forms for use with currentStyle in old IE (e.g. styleFloat jonathantneal/Polyfills-for-IE8#1).
Contributor

jonrohan commented Apr 10, 2013

I'm ok with using this for now. Does just replacing the camel case with - work in most cases?

Owner

JamesMGreene commented Apr 10, 2013

We only get 4 computed styles right now (zIndex, borderTopWidth, borderLeftWidth, and cursor). I believe this technique will work for all of them, yes. If we add any more, we'll need to double-check each one's oldIE equivalent name.

@ghost ghost assigned JamesMGreene May 7, 2013

JamesMGreene added a commit to JamesMGreene/zeroclipboard that referenced this pull request Jul 3, 2013

JamesMGreene added a commit to JamesMGreene/zeroclipboard that referenced this pull request Jul 3, 2013

JamesMGreene added a commit to JamesMGreene/zeroclipboard that referenced this pull request Jul 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment