Skip to content

Commit cd71463

Browse files
committed
Also include ICS
1 parent 6eb5bfd commit cd71463

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/apply-preserving-inline-style.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
* See https://connect.microsoft.com/IE/feedback/details/811744/ie11-bug-with-implementation-of-css-transforms-in-svg,
2121
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/1173754/,
2222
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/101242/, etc.
23+
* The same problem is exhibited by pre-Chrome Android browsers (ICS).
2324
* Unfortunately, there's no easy way to feature-detect it.
2425
*/
2526
function updateSvgTransformAttr(window) {
2627
if (window._webAnimationsUpdateSvgTransformAttr == null) {
2728
window._webAnimationsUpdateSvgTransformAttr =
28-
/Trident|MSIE|IEMobile|Edge/i.test(window.navigator.userAgent);
29+
/Trident|MSIE|IEMobile|Edge|Android 4/i.test(window.navigator.userAgent);
2930
}
3031
return window._webAnimationsUpdateSvgTransformAttr;
3132
}

test/js/apply-preserving-inline-style.js

+4
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ suite('apply-preserving-inline-style', function() {
106106
' (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36' +
107107
' Edge/12.10136');
108108
assert.equal(updateSvgTransformAttr(win), true);
109+
// ICS Android: transforms are NOT supported.
110+
agent('Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; MZ604 Build/I.7.1-45)' +
111+
' AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30');
112+
assert.equal(updateSvgTransformAttr(win), true);
109113
});
110114
test('Set and clear transform', function() {
111115
// This is not an SVG element, so CSS transform support is not consulted.

0 commit comments

Comments
 (0)