BUG-13874 Duplicate typing for dynaforms over IE 11
When a dynaform has some fields with validations, when typing some data was duplicated. I added a validation to detect IE version, if this is 11 a meta tag is added in the HTML (<meta http-equiv="X-UA-Compatible" content="IE=8"/>). This tag let the browser use the IE8 compatibility and prevent the duplicated characters issue. The validation for IE 11 is a preg_match php function searching a 'Trident/' string. This is diferent in IE10, where the User-agent has MSIE on it. On IE 11 MSIE was deleted and the only way to detect that the browser is IE11 is searching 'Trident/'.
This commit is contained in:
@@ -270,8 +270,13 @@ class SkinEngine
|
||||
$meta = null;
|
||||
$dirBody = null;
|
||||
|
||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
||||
$ie = intval($arrayMatch[1]);
|
||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match("/^.*\(.*Trident.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
||||
|
||||
//Get the IE version
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ie = intval($arrayMatch[1]);
|
||||
}
|
||||
|
||||
$swTrident = (preg_match("/^.*Trident.*$/", $_SERVER["HTTP_USER_AGENT"]))? 1 : 0; //Trident only in IE8+
|
||||
|
||||
$sw = 1;
|
||||
@@ -279,9 +284,10 @@ class SkinEngine
|
||||
if ((($ie == 7 && $swTrident == 1) || $ie == 8) && !preg_match("/^ux.+$/", SYS_SKIN)) { //IE8
|
||||
$sw = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($sw == 1) {
|
||||
if ($ie == 10) {
|
||||
if ($ie == 10 || $ie == 11 ) {
|
||||
$ie = 8;
|
||||
}
|
||||
|
||||
@@ -652,10 +658,14 @@ class SkinEngine
|
||||
$meta = null;
|
||||
$header = null;
|
||||
|
||||
if (preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
||||
$ie = intval($arrayMatch[1]);
|
||||
|
||||
if ($ie == 10) {
|
||||
if (preg_match("/^.*\(.*Trident.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
||||
|
||||
//Get the IE version
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ie = intval($arrayMatch[1]);
|
||||
}
|
||||
|
||||
if ($ie == 10 || $ie == 11) {
|
||||
$ie = 8;
|
||||
|
||||
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=$ie\" />";
|
||||
|
||||
Reference in New Issue
Block a user