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.

This commit is contained in:
photonstorm
2014-02-10 02:23:45 +00:00
parent ae74cb02dd
commit d2366d5fa5
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -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
+3 -2
View File
@@ -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