-
Notifications
You must be signed in to change notification settings - Fork 128
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
FR: support of shadowdom #25
Comments
BTW: Using custom elements with shadow dom and encapsulated styles has the advantage we don'T have to clone and do a deep style. We can use this behavior also to use your lib on other scenarios then only drag and drop. |
The simple answer would be to use a custom drag image as shown in the sample: function handleDragStart(e) { If that is not an option, I would try to create a fake clone this way: var clone = document.createElement('div'); I guess this may or may not work depending on how the element with the shadow DOM is implemented. If all its main properties are reflected as attributes, it might work pretty well. If not, it probably won't work very well at all. I am sorry, I am not big on shadow DOM yet... |
Makes sense, thanks for the explanation. Tough problem to solve in a general way. |
if we do a WORKING
NOT WORKING
really not sure why that, but the problem is also with your simple cloneNode(true) implementation |
I'm closing this mostly because of how much time has passed. If this is still a concern, please file a new issue. I recently signed on to this project and would like to make sure we're covering all the bases, while also making sure there are no lingering issues based on old code. |
We are creating a web component for drag and drop with stenciljs and your mobile lib.
we give the ability to add a custom drag image, it is working on NON mobile behavior but it is not working on mobile, because you don't support shadow dom.
But stenciljs is realing on web components with shadow dom and css4 variables.
Can you help?
The main problem is the default src.cloneNode(true) is not coping slots and nested custom elements.
Some ideas how we can resolve this?
Not sure if deep cloning on shadowdom is working. One solution could be passing an element to your lib and your lib does not adding this to the dom, but it moves only the given element instead of the cloned element
The text was updated successfully, but these errors were encountered: