minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.
MIT License
519 stars 69 forks source link

not work in nwjs or electron #146

Closed jonlepage closed 1 year ago

jonlepage commented 1 year ago

Describe the bug Hi, when i use nwjs or electron, the dnd of your lib not work! Did you use something special thats can break the behavior in this kind of wrapper? Is work fine if i run my app on heavy browser. Dnd work with other libs. thanks

To Reproduce Steps to reproduce the behavior:

  1. use nwjs or electron as wrapper https://nwjs.io

Expected behavior DND should work like in browser

Screenshots If applicable, add screenshots to help explain your problem. gjuuyyu

Desktop (please complete the following information): image

Additional context the app is clean no css or other stuff for the test image

minop1205 commented 1 year ago

@djmisterjon Thanks for the report. I also tried to run it with nwjs and confirmed the same phenomenon.

I looked into it and found the following workaround. https://github.com/nwjs/nw.js/issues/7531

I was able to work around the problem by adding the following line to package.json.

"chromium-args": "--mixed-context",
jonlepage commented 1 year ago

@djmisterjon Thanks for the report. I also tried to run it with nwjs and confirmed the same phenomenon.

I looked into it and found the following workaround. nwjs/nw.js#7531

I was able to work around the problem by adding the following line to package.json.

"chromium-args": "--mixed-context",

interesting,nice catch it work! But my issue now with is am not able to load 2 plugins in same time with arg --mixed-context !

"chromium-args": "--mixed-context --disable-raf-throttling --max-old-space-size=8192 --enable-spell-checking --remote-debugging-port=9222 --force-gpu-mem-available-mb=9999999 --load-extension='./plugins/aamddddknhcagpehecnhphigffljadon','./plugins/fmkadmapgofadopljbjfkapdkoienihi'",

But i think is a parser issu from internal nwjs . After some hours and many test, something defensively wrong! image

I will report on the nwjs repo. Thank for your time and your workaround, your assomme.!