From d2366d5fa5d2cbf90e3c9dbe17337a2f6ccf52c0 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Mon, 10 Feb 2014 02:23:45 +0000 Subject: [PATCH] Fix for issue #376 - IE11 didn't populate the Device.ieVersion value. Now extracted from Trident revision, but still use Device.trident instead for IE11+ checks. --- README.md | 1 + src/system/Device.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b35e939c..cfb88c15 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ Bug Fixes: * Fixed bug where changing State would cause the camera to not reset if it was following an object. * Tile had 2 properties (callback and callbackContext) that were never assigned, updated to use the proper names (thanks ratkingsimon) * Issue 382: Error when using InputHandler#onInputUp & sprite destroys itself during the event. +* IE11 didn't populate the Device.ieVersion value. Now extracted from Trident revision, but still use Device.trident instead for IE11+ checks. You can view the Change Log for all previous versions at https://github.com/photonstorm/phaser/changelog.md diff --git a/src/system/Device.js b/src/system/Device.js index ce1452eb..97ff397b 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -189,7 +189,7 @@ Phaser.Device = function () { this.ie = false; /** - * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion. * @default */ this.ieVersion = 0; @@ -474,11 +474,12 @@ Phaser.Device.prototype = { { this.silk = true; } - else if (/Trident\/(\d+\.\d+);/.test(ua)) + else if (/Trident\/(\d+\.\d+); rv:(\d+\.\d+)/.test(ua)) { this.ie = true; this.trident = true; this.tridentVersion = parseInt(RegExp.$1, 10); + this.ieVersion = parseInt(RegExp.$2, 10); } // WebApp mode in iOS