mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
Fix drag & drop interfered with mouse selection when editing tag
This commit is contained in:
parent
0dfeae9b16
commit
469c0cf742
@ -297,7 +297,6 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
||||
pull: pull,
|
||||
put: !(this.readonly || this.disabled)
|
||||
},
|
||||
// filter: "[isEditing],.et2-no-drag",
|
||||
onEnd: this.handleSortEnd
|
||||
});
|
||||
}
|
||||
@ -935,6 +934,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
||||
{
|
||||
const readonly = (this.readonly);
|
||||
const isEditable = !readonly;
|
||||
const isValid = this.validateAddress(value);
|
||||
|
||||
return html`
|
||||
<et2-email-tag
|
||||
@ -943,6 +943,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
||||
class=${classMap({
|
||||
"et2-select-draggable": !this.readonly && this.allowDragAndDrop,
|
||||
})}
|
||||
variant=${this.isValid ? nothing : "danger"}
|
||||
.fullEmail=${this.fullEmail}
|
||||
.onlyEmail=${this.onlyEmail}
|
||||
.value=${live(value)}
|
||||
|
@ -200,10 +200,14 @@ export class Et2Tag extends Et2Widget(SlTag)
|
||||
}
|
||||
this.getRootNode().host.hide()
|
||||
this.isEditing = true;
|
||||
this.setAttribute("isEditing", "");
|
||||
this.setAttribute("contenteditable", "true");
|
||||
|
||||
this.requestUpdate();
|
||||
this.updateComplete.then(() =>
|
||||
{
|
||||
// This stops drag and drop from interfereing with mouse edits
|
||||
this._editNode.input.setAttribute("contenteditable", "true");
|
||||
|
||||
this._editNode.focus();
|
||||
})
|
||||
}
|
||||
@ -211,7 +215,7 @@ export class Et2Tag extends Et2Widget(SlTag)
|
||||
stopEdit()
|
||||
{
|
||||
this.isEditing = false;
|
||||
this.removeAttribute("isEditing");
|
||||
this.removeAttribute("contenteditable");
|
||||
let event = new Event("change", {
|
||||
bubbles: true
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user