mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-13 04:54:11 +01:00
N°4582 Align backspace behavior in selectize widgets with jQuery autocomplete one
This commit is contained in:
@@ -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] {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user