Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upModernizr.preserve3d returns false positive in IE11 on Windows 10 #1748
Comments
This comment has been minimized.
This comment has been minimized.
|
hey @splotzky! |
This comment has been minimized.
This comment has been minimized.
|
so, it seems like IE 11 added support for parsing the value, but never actually added the feature :[ as a result, we need to do a functional test to get accurate information. A functional test on |
This comment has been minimized.
This comment has been minimized.
|
This seems to be a tough nut to crack... |
This comment has been minimized.
This comment has been minimized.
|
I've played around with your working demo for a while. I think my approach would be to create a parent element and a nested child element. These elements should both be set to |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@splotzky not following - I haven't found an incorrect result with my test yet, have you? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@patrickkettner I have found an incorrect result in Firefox 42.0 on Windows 7. |
This comment has been minimized.
This comment has been minimized.
|
thanks for the heads up. aFarkas' seems to be bulletproof as always. A PR would be awesome, otherwise I hope to get one in myself tomorrow On Mon, Nov 9, 2015 at 10:42 PM, splotzky notifications@github.com wrote:
patrick |
This comment has been minimized.
This comment has been minimized.
|
@aFarkas I like your solution. It works reliably in IE 11 on Windows 10. |
This comment has been minimized.
This comment has been minimized.
Will do, if you haven't yet. Just give 1-2 days. Want to also try to get something good considering the perf problems we get if we use testStyles. |
This comment has been minimized.
This comment has been minimized.
|
Two months have passed, but this solution is not included in Modernizr 3.3.0 (released on 11 Jan 2016). When will you publish it? |
This comment has been minimized.
This comment has been minimized.
|
@splotzky it doesn't look like anyone has submitted the work in the form of a PR, so there's nothing to publish. |
This comment has been minimized.
This comment has been minimized.
|
I just have put the code from @aFarkas into a test. Hope this helps |
This comment has been minimized.
This comment has been minimized.
|
Sorry this is my fault. I totally forgot about this and have so much to work. My problem with this code is/was, that it forces sync layout and punisches all browsers performance. Could you test whether the following test works as expected? define(['Modernizr', 'createElement', 'docElement'], function(Modernizr, createElement, docElement) {
Modernizr.addTest('preserve3d', function() {
var outerDiv, innerDiv;
var CSS = window.CSS;
var result = true;
if(!CSS || !CSS.supports || !CSS.supports('(transform-style: preserve-3d)')){
outerDiv = createElement('div');
innerDiv = createElement('div');
outerDiv.style.cssText = 'transform-style: preserve-3d; transform-origin: right; transform: rotateY(40deg);';
innerDiv.style.cssText = 'width: 9px; height: 1px; background: #000; transform-origin: right; transform: rotateY(40deg);';
outerDiv.appendChild(innerDiv);
docElement.appendChild(outerDiv);
result = innerDiv.getBoundingClientRect();
docElement.removeChild(outerDiv);
result = result.width && result.width < 4;
}
return result;
});
}); |
This comment has been minimized.
This comment has been minimized.
|
Put the PR up for review in #1920 |
Modernizr.preserve3d returns true in IE11 on Windows 10 (incorrect).
In IE11 on Windows 7 it returns false (correct).
Found this issue in Modernizr 3.2.0.