mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-24 15:54:00 +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)
|
||||
}).error(() => {
|
||||
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) {
|
||||
this.attachments.push(attachment);
|
||||
|
|
Loading…
Reference in a new issue