From 2adeb60feac02667cd3174c6d0e9bcfd568255c3 Mon Sep 17 00:00:00 2001 From: "SebC." Date: Mon, 23 Sep 2013 12:53:01 +0200 Subject: [PATCH] Fix ngSwipeSpec for MSIE documentMode detection --- test/ngTouch/directive/ngSwipeSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ngTouch/directive/ngSwipeSpec.js b/test/ngTouch/directive/ngSwipeSpec.js index a7869a36639f..fd825cdbc908 100644 --- a/test/ngTouch/directive/ngSwipeSpec.js +++ b/test/ngTouch/directive/ngSwipeSpec.js @@ -17,7 +17,7 @@ var swipeTests = function(description, restrictBrowsers, startEvent, moveEvent, // Skip tests on IE < 9. These versions of IE don't support createEvent(), and so // we cannot control the (x,y) position of events. // It works fine in IE 8 under manual testing. - var msie = +((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]); + var msie = document.documentMode || +((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]); if (msie < 9) { return; }