CarlosNZ / json-edit-react

React component for editing/viewing JSON/object data
https://carlosnz.github.io/json-edit-react/
MIT License
183 stars 18 forks source link

Bug report - Unexpected Node Collapsing Upon Confirm Button Click #123

Closed roman-simionov closed 2 months ago

roman-simionov commented 2 months ago

Describe the bug

Hi,

I've encountered an issue while attempting to add a new node to JSON.

version 1.16.0

Steps to Reproduce:

  1. Open the demo.
  2. Click the Add button on the root node.
  3. Enter a name for the new node.
  4. Click the Confirm button.

Current behavior The root node collapses unexpectedly.

Expected behavior The root node should remain expanded after adding a new child node.

This video demonstrates the problem

CarlosNZ commented 2 months ago

Ah okay, thanks. I made a change recently to expand the clickable area for collapsing and had to make sure existing clicks didn't "fall through" and register a collapse click. But it looks like I missed one 😳, so thanks for pointing out. Look for a fix in the next few days :)

CarlosNZ commented 2 months ago

@roman-simionov -- this is now fixed in v1.16.3

Thanks for bringing it to my attention 👍