Juicy / juicy-jsoneditor

Polymer Element that wraps josdejong/jsoneditor and adds two-way binding for edited JSON.
http://juicy.github.io/juicy-jsoneditor/
MIT License
42 stars 12 forks source link

Upgrade to hybrid element #15

Closed Mihaiii closed 7 years ago

Mihaiii commented 7 years ago

NOT FOR MERGE

There is a problem with it when mode is code.

Related to https://github.com/Starcounter/RebelsLounge/issues/140 .

Mihaiii commented 7 years ago

I spent too much time on this already and have to move on to other things. @tomalec I need help with this one, sorry. Could you please have a look when possible?

tomalec commented 7 years ago

@Mihaiii please review my changes

Mihaiii commented 7 years ago

@tomalec Yes, the layout is ok now. Thank you for the update! It is still not for merge since the user can't change the mode when another selected from the drop-down list. I'll look into it.

tomalec commented 7 years ago

It seems to be a bug/misbehavior of JSONEditor itself. Shadow DOM v1 scopes the events and current JSONEditor implementation addEventListener to the window from which perspective event.target is no longer clicked menu item, but shadow host. see https://github.com/josdejong/jsoneditor/issues/447

tomalec commented 7 years ago

@Mihaiii do we use modes extensively in our apps or starcounter-debug-aid? if not we could merge this PR, then wait for https://github.com/josdejong/jsoneditor/pull/448 to be merged or fixed in JSONEditor otherwise.

Mihaiii commented 7 years ago

Yup, you're right. Merging. :)