Open zhangjin747 opened 3 years ago
Thanks for reporting @zhangjin747. How can I reproduce this issue exactly? And what browser are you using?
@josdejong You just need to copy some text from key or value field and paste it to another field in tree mode. And then, the cursor can not be inserted between letters. I'm using the latest Microsoft Edge browser based on Chromium.
Hm I've tried on Edge but am not able to reproduce this. Can it be related to specific locales or keyboard inputs?
@josdejong I have figured out the problem. What I have copied seems to be formatted text(although it looks just like plain text) and if I use paste as plain text, everything works fine. In the older version, the formatted text will be converted to plain text on blur, but in the latest version, it won't happen. I don't know if this is a bug.
Ahh, that helps a lot. Looking at the history, it may be related to the fix made in v8.6.8
in the following commit: https://github.com/josdejong/jsoneditor/commit/ad021ec7afa65da05f347b40b783947eab82abbd.
Without being able to reproduce this myself I'm not sure though how to create a fix for the issue you encounter. Any ideas?
In the tree mode, after paste plain text in fields, the pasted text was wrapped by a 'span' element and it cause the text cannot be selected or insert cursor. Atfer tesing several versions, I found the problem happens since version 8.6.7, previous version works fine.