N°4582 Align backspace behavior in selectize widgets with jQuery autocomplete one

This commit is contained in:
Stephen Abello
2022-02-25 09:39:39 +01:00
parent 4694e8152e
commit 2e08cff9ee
2 changed files with 4 additions and 0 deletions

View File

@@ -64,6 +64,8 @@ $ibo-input-select--autocomplete-item-image--border: 1px solid $ibo-color-grey-60
color: inherit;
border-color: $ibo-color-white-100;
padding-left: $ibo-input-select--padding-x;
@extend %ibo-font-ral-nor-150;
}
> [data-value] {

View File

@@ -25,8 +25,10 @@ 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;
this.clear(true);
e.preventDefault();
this.setTextboxValue(sPreviousValue.slice(0, -1));
return;
}
}