mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-15 14:04:12 +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;
|
color: inherit;
|
||||||
border-color: $ibo-color-white-100;
|
border-color: $ibo-color-white-100;
|
||||||
padding-left: $ibo-input-select--padding-x;
|
padding-left: $ibo-input-select--padding-x;
|
||||||
|
|
||||||
|
@extend %ibo-font-ral-nor-150;
|
||||||
}
|
}
|
||||||
|
|
||||||
> [data-value] {
|
> [data-value] {
|
||||||
|
|||||||
@@ -25,8 +25,10 @@ Selectize.define('custom_itop', function(aOptions) {
|
|||||||
if (this.$control_input.val() === '' && !this.$activeItems.length) {
|
if (this.$control_input.val() === '' && !this.$activeItems.length) {
|
||||||
iIndex = this.caretPos-1;
|
iIndex = this.caretPos-1;
|
||||||
if (iIndex >= 0 && iIndex < this.items.length) {
|
if (iIndex >= 0 && iIndex < this.items.length) {
|
||||||
|
let sPreviousValue = this.options[this.items[iIndex]].label;
|
||||||
this.clear(true);
|
this.clear(true);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
this.setTextboxValue(sPreviousValue.slice(0, -1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user