Element.Style compat fixes #2559

Closed
wants to merge 3 commits into
from

4 participants

@gonchuki

This is a series of patches backporting several feature detects that superseded browser sniffing techniques in the interim between 1.2.x and 1.4.x/1.5 and enable IE11 to work correctly with the 1.2 branch

No tests related to these were failing, but the 1.2.x test coverage is very poor so probably new tests would have been needed to show it failing (not sure if I even did this right, I took the edge test suite and ran the 1.2 specs against the 1.2.x branch source code). Let me know otherwise if testing is done differently on that branch or if we should add coverage for these cases.

@gonchuki

btw, from that suite there are 2 failing cases but seems it's always been like that, I have another backported fix on a different branch that could fix it, but it might also mean "regressions" for people that are already accounting for that bug so it might not be a good idea to fix it.

@megawac megawac commented on the diff Feb 10, 2014
Source/Element/Element.Style.js
@@ -90,7 +103,7 @@ Element.implement({
var color = result.match(/rgba?\([\d\s,]+\)/);
if (color) result = result.replace(color[0], color[0].rgbToHex());
}
- if (Browser.Engine.presto || (Browser.Engine.trident && !$chk(parseInt(result, 10)))){
+ if (!window.getComputedStyle && !$chk(parseInt(result, 10))){
@megawac
megawac added a line comment Feb 10, 2014

Isn't $chk deprecated - can't this be isFinite(result) or Type.isNumber(parseInt(result, 10))

@gonchuki
gonchuki added a line comment Feb 10, 2014

this is a patch for the 1.2.x branch to support people who are stuck on an older version but need to support IE11, only the minimal viable code was backported to avoid changing the behavior of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ibolmo ibolmo modified the milestone: 1.5, 1.5.1 Mar 3, 2014
@ibolmo
MooTools member

I'm moving this to 1.5.1 since we've never done something as kind as to go back to previous versions. I would like to start trickling down major fixes, however.

@gonchuki

1.5.1 is a bad milestone for this, the patch has nothing to do with 1.5.1

Also remember that 1.2.6 was released due to another major issue with specific browsers [1], so I don't see why we shouldn't fix the 1.2.x branch once again with a fix that allows it to keep working correctly on IE >= 10

@ibolmo ibolmo modified the milestone: 1.5, 1.5.1 Mar 4, 2014
@ibolmo
MooTools member

1.5 it is. ;)

@kentaromiura
MooTools member

@gonchuki iiuc those are fixes for the 1.2.x branch, right?
what's the current situation 1.2.x doesn't run at all on ie11 or what?

@gonchuki
@timwienk timwienk modified the milestone: 1.2.7, 1.5.0 May 7, 2014
@ibolmo
MooTools member

I apologize to @gonchuki for this great work. I believe going forward 1.2 is now implicitly deprecated/EOL.

@ibolmo ibolmo closed this Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment