N°4582 Prevent selectize behavior introduced by 2e08cff from displaying unescaped characters

This commit is contained in:
Stephen Abello
2022-03-02 10:53:00 +01:00
parent 2b1e583dc7
commit 3608c6b8ab

View File

@@ -25,7 +25,7 @@ Selectize.define('custom_itop', function(aOptions) {
if (this.$control_input.val() === '' && !this.$activeItems.length) {
iIndex = this.caretPos-1;
if (iIndex >= 0 && iIndex < this.items.length) {
let sPreviousValue = this.options[this.items[iIndex]].label;
let sPreviousValue = this.options[this.items[iIndex]].search_label;
this.clear(true);
e.preventDefault();
this.setTextboxValue(sPreviousValue.slice(0, -1));