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
Modernizr.preserve3d returns false positive in IE11 on Windows 10 #1748
Comments
hey @splotzky! |
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 seems to be a tough nut to crack... |
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 |
|
@splotzky not following - I haven't found an incorrect result with my test yet, have you? |
@patrickkettner I have found an incorrect result in Firefox 42.0 on Windows 7. |
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 |
@aFarkas I like your solution. It works reliably in IE 11 on Windows 10. |
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. |
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? |
@splotzky it doesn't look like anyone has submitted the work in the form of a PR, so there's nothing to publish. |
I just have put the code from @aFarkas into a test. Hope this helps |
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;
});
}); |
fixed preserve-3d detect on IE11/Windows 10 in #1748
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.
The text was updated successfully, but these errors were encountered: