mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 13:28:53 +08:00
Focus on newly added step element [sb_SCI-7938]
This commit is contained in:
parent
d42cd85533
commit
4ab8768024
1 changed files with 11 additions and 1 deletions
|
@ -421,7 +421,17 @@
|
||||||
this.elements.push(result.data)
|
this.elements.push(result.data)
|
||||||
}).error(() => {
|
}).error(() => {
|
||||||
HelperModule.flashAlertMsg(this.i18n.t('errors.general'), 'danger');
|
HelperModule.flashAlertMsg(this.i18n.t('errors.general'), 'danger');
|
||||||
|
}).done(() => {
|
||||||
|
this.$parent.$nextTick(() => {
|
||||||
|
const children = this.$children
|
||||||
|
const lastChild = children[children.length - 1]
|
||||||
|
lastChild.$el.scrollIntoView(false)
|
||||||
|
window.scrollBy({
|
||||||
|
top: 200,
|
||||||
|
behavior: 'smooth'
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
});
|
||||||
},
|
},
|
||||||
addAttachment(attachment) {
|
addAttachment(attachment) {
|
||||||
this.attachments.push(attachment);
|
this.attachments.push(attachment);
|
||||||
|
|
Loading…
Add table
Reference in a new issue