mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-14 00:54:32 +08:00
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:
commit
ff117b8358
1 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue