Merge pull request #6784 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-08 13:34:43 +01:00 committed by GitHub
commit ff117b8358
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@
v-model="newValue"
@keydown="handleKeypress"
@blur="handleBlur"
@keyup.escape="cancelEdit"
@keyup.escape="cancelEdit && this.atWhoOpened"
@focus="setCaretAtEnd"/>
<textarea v-else
ref="input"
@ -28,7 +28,7 @@
v-model="newValue"
@keydown="handleKeypress"
@blur="handleBlur"
@keyup.escape="cancelEdit"
@keyup.escape="cancelEdit && this.atWhoOpened"
@focus="setCaretAtEnd"/>
</template>
<div
@ -240,6 +240,9 @@
sel.collapse(sel.anchorNode, offset);
},
handleKeypress(e) {
this.atWhoOpened = $('.atwho-view:visible').length > 0
if (this.atWhoOpened) return;
if (e.key == 'Escape') {
this.cancelEdit();
} else if (e.key == 'Enter' && this.saveOnEnter && e.shiftKey == false) {