diff options
author | Max <max@nextcloud.com> | 2022-02-07 10:57:17 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-02-09 11:42:46 +0300 |
commit | a4ab0066e12c656682e29a716b866d6ed3d36ccc (patch) | |
tree | 5d6758a13e06922830c2f5bf6a145081560ff06e /src | |
parent | f611a0f7f3ddb568b3e6291f35bc1b5ffda24964 (diff) |
fix: scroll image into view once it has been loaded
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/nodes/ImageView.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index 5bada41e9..5d3887029 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -122,7 +122,7 @@ export default { mixins: [ store, ], - props: ['node', 'extension', 'updateAttributes', 'getPos'], // eslint-disable-line + props: ['editor', 'node', 'extension', 'updateAttributes', 'getPos'], // eslint-disable-line data() { return { imageLoaded: false, @@ -292,6 +292,9 @@ export default { }, onLoaded() { this.loaded = true + this.$nextTick(() => { + this.editor.commands.scrollIntoView() + }) }, deleteImage() { const tr = this.view.state.tr |