Portal : Autocomplete bug with IE9 in forms

SVN:trunk[4424]
This commit is contained in:
Guillaume Lajarige
2016-09-29 10:16:30 +00:00
parent b7d101cdfb
commit 88eece7188

View File

@@ -245,6 +245,9 @@ EOF
}
});
// This check is only for IE9... Otherwise the widget is duplicated on the field causing misbehaviour.
if($('#$sAutocompleteFieldId').typeahead('val') === undefined)
{
$('#$sAutocompleteFieldId').typeahead({
hint: true,
hightlight: true,
@@ -262,6 +265,7 @@ EOF
})
.off('typeahead:select').on('typeahead:select', function(oEvent, oSuggestion){
$('#{$this->oField->GetGlobalId()}').val(oSuggestion.id);
$('#{$sAutocompleteFieldId}').val(oSuggestion.name);
// Triggering set_current_value event
var oValue = {};
oValue[oSuggestion.id] = oSuggestion.name;
@@ -277,6 +281,7 @@ EOF
{
bFound = true;
$('#{$this->oField->GetGlobalId()}').val(oDatums[i].id);
$('#{$sAutocompleteFieldId}').val(oDatums[i].name);
break;
}
}
@@ -287,6 +292,7 @@ EOF
$('#{$sAutocompleteFieldId}').val('');
}
});
}
EOF
);
}