yansenlei / VJsoneditor

:large_blue_diamond: vue use jsoneditor
https://yansenlei.github.io/VJsoneditor/
Apache License 2.0
182 stars 45 forks source link

Cursor jumps to start position on change #24

Open reallyalexpro opened 4 years ago

reallyalexpro commented 4 years ago

In code mode cursor jumps to start position after json edit.

reallyalexpro commented 4 years ago

Reproduced with Bootstrap Vue Modal. Edit festive-thunder-v48ft

yansenlei commented 4 years ago

This only happens in b-modal...

Lazygeek1981 commented 4 years ago

Happens to me, too. Any idea how to fix it? I would really like to use your component in a b-modal dialog.

yansenlei commented 3 years ago

I find the dom is destroyed when the b-modal is hidden.

Tentative commented 3 years ago

I'm trying to use it with b-modal too, same problem.

Tentative commented 3 years ago

Possible fix for anyone using it in bootstrap: add static and lazyprops set to 'true' to b-modal

ref: (https://bootstrap-vue.org/docs/components/modal#lazy-loading-and-static-modals)

Reproduced and tested: https://codesandbox.io/s/elated-dubinsky-8fill?fontsize=14&hidenavigation=1&theme=dark