Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Fixed exclude getBoundingClientRect on IE8 #91

Merged

Conversation

adrianolek
Copy link
Contributor

Webdrivercss crashes when using excludes on IE8.
On IE8 the object returned by getBoundingClientRect lacks width and height properties.
The PR fixes this issue.

@christian-bromann
Copy link
Contributor

hey @adrianolek,
thanks for the PR. Can we be 100% sure about elemRect.left + elemRect.width === elemRect.right? This was the reason why I did that in the first place. I mean it should be the same, right? I will check if I can find something about that and if there are no problems with that I will merge it.
Thanks!

@adrianolek
Copy link
Contributor Author

Seems like they are. I've checked it this way:
https://gist.github.com/adrianolek/35cf7db4b7f92c20a7d6

Besides this IE8 issue is already handled similarily here.

Also there's a test for excluding elements, which still passes.

And from https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIDOMClientRect

height | Height of the rectangle box (This is identical to bottom minus top).
width | Width of the rectangle box (This is identical to right minus left).

@christian-bromann
Copy link
Contributor

Oh nice, thanks for checking! Merging

christian-bromann added a commit that referenced this pull request Jul 16, 2015
Fixed exclude getBoundingClientRect on IE8
@christian-bromann christian-bromann merged commit 77dd500 into webdriverio-boneyard:master Jul 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants