flipbyte / formik-json-schema

Easily create react forms using JSON / Javascript Object
MIT License
151 stars 40 forks source link

Code Editor cursor moves to the end on each character typed #46

Closed geseq closed 5 years ago

geseq commented 5 years ago

Describe the bug

Code Editor cursor moves to the end of the content on each character typed.

To Reproduce

  1. Go to the demo code editor.
  2. paste some content.
  3. try to edit anywhere but the end. Any keystroke moves the cursor to the end of the content.

Expected behavior

It should be possible to edit the content

Your environment

Demo

geseq commented 5 years ago

nvm, works with autoCursor: false

easeq commented 5 years ago

The config object will look as follows:

{
    type: "field",
    renderer: "code-editor",
    ...
    attributes: {
        ...
        autoCursor: false,
    }
}