Merge pull request #6772 from G-Chubinidze/gc_SCI_9829

Smart annotation is not saved on checklist item [SCI-9829]
This commit is contained in:
Martin Artnik 2023-12-07 08:45:21 +01:00 committed by GitHub
commit 4bcf41399d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@
@update="updateText"
@delete="removeItem()"
@keypress="keyPressHandler"
@blur="editingText = false"
@blur="onBlurHandler"
/>
<span v-if="!editingText && (!checklistItem.attributes.urls || deleteUrl)" class="absolute right-0 top-0.5 leading-6 tw-hidden group-hover/checklist-item-header:inline-block !text-sn-blue cursor-pointer" @click="showDeleteModal" tabindex="0">
<i class="sn-icon sn-icon-delete"></i>
@ -139,6 +139,11 @@
this.checklistItem.attributes.checked = this.$refs.checkbox.checked;
this.$emit('toggle', this.checklistItem);
},
onBlurHandler() {
this.$nextTick(() => {
this.editingText = false;
});
},
updateText(text, withKey) {
if (text.length === 0) {
this.disableTextEdit();