manico / vue-jsoneditor

Vue implementation of JSONEditor
MIT License
17 stars 7 forks source link

VJsoneditor step the fist line head where input some words in "code mode" #4

Open SUT-GC opened 6 years ago

SUT-GC commented 6 years ago

Versions and Environment

Vue:2.9.6 Browsers:chrome *OS:10.13.4 (17E199)*

Steps to reproduce

<v-jsoneditor v-model="testJson">

data: function(){
    return {
      json: {
           "success":true 
        }
    }
}

image

when in code mode, input a new line : "hello":"world", where i input w then the cursor step the fist line head,(may be the "vue-jsoneditor" lead to page auto refresh.

version 1.0.13 has the "bug"

where i use version 1.0.10, it's ok

Expected Behavior

Actual Behavior

Reproduction Link

Other comments

SUT-GC commented 6 years ago

new image url

BenR1312 commented 6 years ago

Can confirm this one one too, 1.0.11 is okay. it looks like the change in 1.0.12 brought in the bug. my guess is its related to the watcher, but im not 100% sure. https://github.com/manico/vue-jsoneditor/commit/4cc36d1c89041c4caa6a0b75ef067f75fc696d83#diff-e4b788d8c6b16c9e8ceb19edc10a5066R34