-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Shadow DOM #470
Fix for Shadow DOM #470
Conversation
@txsmith Awesome stuff - I was working on this element (https://www.webcomponents.org/element/ergo/polymer-dragula) but I also encountered issues with shadow dom :-) I can try the wrapper with updated version. |
I've tried this commit and I don't think it is quite enough. I could be wrong, but I'd like to see it work - is there a demo of it working? |
OK, I had to add '.gu-hide { display: none !important }' into a style in the document's head too...then it seems to work (it seems dragula applies that class to hide the element being dragged when searching down the tree to find the element under the cursor). |
David, did you try the demo's in here? These should work on Chrome but I've not made an effort to make the element compatible with Firefox or any other browser yet. If you did try my demo, then the styling problems you have appear to be caused by a missing import for a style module. Make sure you have I tried my patch of dragula on ergo/polymer-dragula but ran into some problems because |
@txsmith I somehow hadn't seen that element so, no, but it seems to be doing essentially the same as what I concluded was necessary (albeit including all the styles in the root document rather than just the ones that are strictly necessary, iinm). However, those demos don't use dom-repeat, which was where I needed to make most changes to polymer-dragula. It'd be awesome if you could have a demo of one of those, since dom-repeat is surely an extremely common use-case. Anyway, I have a working solution, even if it is a hacked together one, so I'm happy for the time being. If dragula-element could be shown to work with dom-repeat, and this PR be merged, I'll switch to all released versions :) It should be noted that I didn't have to make any changes to this patch, so I'd say it is working just fine. Any chance this PR can be merged? [1] https://github.com/txsmith/dragula-element/tree/master/demo |
@bevacqua any chance this PR can be merged? It'd be a step towards us only having to use released versions. |
Thanks for the confimation! I'll add a dom-repeat demo later today. |
Hello, are there any news on this? |
@bevacqua any news on getting this merged? |
@txsmith any news on this? |
any update on this? waiting for this to be merged to use it with polymer 2 |
Also waiting for this to be merged :) |
First of all: I'm sorry it took me so long to get back to this. I've implemented the suggestion from @ergo to flip the |
Than you so much, maybe we can get it merged then :-) |
Hello @bevacqua, any chance this can be merged in? |
We are looking for this as well. @bevacqua I'd like to help get this up to snuff but I don't see any outstanding complaints with it. |
Would be nice to finalise this and finally merge it 🙌 |
@bevacqua any news on this, does this package currently have a maintainer? |
PR seems to be good enough, we did some extensibly review of the code for Lightning Web Components, and it seems to be correct. We also validated with our own implementation of synthetic shadow, and it works too. Can we get this merge? |
Is this good to go? When do you anticipate to merge and publish this? |
I'm not sure dragula is maintained anymore. |
This PR makes dragula work inside Shadow DOM.
I've implemented @kevinpschaaf suggestion to use
composedPath()
if an event target has ashadowRoot
, but I'm not sure if this is the best way sincecomposedPath()
seems quite experimental (See #418).The tests that touch the DOM are modified to run against
document.body
as well as an element inside multiple shadow roots.I've also put together a wrapper element using Polymer with several demos that run successfully with shadowDom enabled.
Suggestions are very welcome!
Fixes #418