Skip to content
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

ShadowDOM support #153

Open
ernsheong opened this issue Feb 16, 2018 · 14 comments
Open

ShadowDOM support #153

ernsheong opened this issue Feb 16, 2018 · 14 comments
Labels
feature-request requesting new functionality to be added question curious about something and just want to ask

Comments

@ernsheong
Copy link

ernsheong commented Feb 16, 2018

I'm trying out Draggable in a shadow DOM, and it doesn't seem to work. A glance at the codebase reveals use of document.addEventListener, etc. which prevents it from working in shadow DOM, presumably because events from inner elements are not able to cross the shadowDOM boundary to the document top level.

@tsov
Copy link
Member

tsov commented Mar 5, 2018

Interesting idea! How about we add an option to specify a host element? If the host element is not specified we'll fallback on document ?

Example

new Draggable(containers, {
  host: shadowRoot,
});

@beefchimi beefchimi added feature-request requesting new functionality to be added question curious about something and just want to ask labels Mar 5, 2018
@ernsheong
Copy link
Author

Thanks for the response!

Yes, that sounds like the way to go about this, and it looks like the strategy employed by https://github.com/RubaXa/Sortable/blob/master/Sortable.js as well.

@tsov
Copy link
Member

tsov commented Mar 5, 2018

No problem 👍

We'll add it to the next release! I'll add a mention on the PR for some 👀

Thanks for bringing this up!

@tsov
Copy link
Member

tsov commented Apr 5, 2018

@ernsheong 👋 if you are interested in following ShadowDOM support follow either:

We are currently working on supporting iframes, which ties in nicely with ShadowDOM, as we will support the DocumentOrShadowRoot interface

@ernsheong
Copy link
Author

@tsov thank you for the effort. This is nice to see! Not many libraries are as forward thinking, and many are reluctant to add that complexity. Kudos for that 👍

@ralcar
Copy link

ralcar commented May 31, 2018

Does ShadowDOM work yet or is this still work in progress? Would really like to try this in Polymer 3

@tsov
Copy link
Member

tsov commented May 31, 2018

@ralcar ShadowDOM support is still on the way! Both @beefchimi and I are/were on vacation in-between, but we are fully dedicated to support ShadowDOM all the way.

@ralcar
Copy link

ralcar commented Jul 13, 2018

@tsov Any news on this? =(

@MaximKipot
Copy link

@tsov Is this awesome feature still on the way?

@JosefJezek
Copy link

@tsov Please put it in a high priority 🆙

@ralcar
Copy link

ralcar commented Aug 18, 2018

Yes please do! :D

@aletorrado
Copy link

aletorrado commented Dec 19, 2018

Any update about this feature?

@TimeBandit
Copy link

I believe this is affecting my end-to-end. I am running tests inside Cypress.js which uses iframes to show your tests running. We are using draggable to simulate a drag and drop. This error message is seen when the mouseup event is triggered.

Uncaught TypeError: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite.

Please comment or provide a workaround. I think the issue is line 173

I should add I am running Ubuntu.

@minicatsCB
Copy link

Hello, hope you are all doing well. I just wanted to check in with you and see how the issue is going. I know there might be other demanding tasks, so I appreciate your work and dedication.

I see there are at least two PR's:

I'm not very familiar with the technical details, but I'm curious to hear about the progress and challenges. I want to understand what you're doing and how it works. Is there anything I can do to help?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request requesting new functionality to be added question curious about something and just want to ask
Projects
None yet
Development

No branches or pull requests

9 participants