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

Not fully corrected closest-inline breaks use of bpmn-js inside shadow DOM #8

Closed
tobiaskahl opened this issue Apr 30, 2020 · 6 comments · Fixed by #9
Closed

Not fully corrected closest-inline breaks use of bpmn-js inside shadow DOM #8

tobiaskahl opened this issue Apr 30, 2020 · 6 comments · Fixed by #9
Assignees
Labels
spring cleaning Could be cleaned up one day

Comments

@tobiaskahl
Copy link

Inside shadow-dom the toplevel element is an document-fragment instead of the document.

See also:
#5 (closest() breaks use of bpmn-js inside shadow DOM)

To fix that you have inlined "closet" an fixed:
while (parent && parent !== document) {
to
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE && currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {

But in the version on npmjs.com this correction is used only in "dist/index.js:276".
In the bundle is an second old implementation still alive.

"dist/index.jx:331":
`var closest$1 = function (element, selector, checkYoSelf) {
var parent = checkYoSelf ? element : element.parentNode;

while (parent && parent !== document) {
if (matchesSelector$1(parent, selector)) return parent;
parent = parent.parentNode;
}
};`

npm-version 3.1.2:
min-dom.zip

@tobiaskahl tobiaskahl added the bug Something isn't working label Apr 30, 2020
@nikku
Copy link
Member

nikku commented Apr 30, 2020

Please use our existing but report template and include the concrete steps to reproduce your issue, preferibly a CodeSandbox or HTML snippet.

@nikku nikku added help wanted Extra attention is needed and removed bug Something isn't working labels Apr 30, 2020
@nikku

This comment has been minimized.

@nikku
Copy link
Member

nikku commented Apr 30, 2020

But in the version on npmjs.com this correction is used only in "dist/index.js:276".
In the bundle is an second old implementation still alive.

@oguzeroglu Could you have a look if that is the case?

@nikku
Copy link
Member

nikku commented Apr 30, 2020

If so, we should release a proper version with rebuilt, fixed distributions.

@oguzeroglu oguzeroglu self-assigned this Apr 30, 2020
@nikku nikku added ready Ready to be worked on and removed help wanted Extra attention is needed labels Apr 30, 2020
@tobiaskahl
Copy link
Author

Please use our existing but report template and include the concrete steps to reproduce your issue, preferibly a CodeSandbox or HTML snippet.

npm install min-dom:3.1.2
open node_modules\min-dom\dist\index.js
look at line 276ff and 331ff

@oguzeroglu oguzeroglu added the spring cleaning Could be cleaned up one day label May 27, 2020
@nikku nikku assigned nikku and unassigned oguzeroglu Jun 3, 2020
nikku added a commit that referenced this issue Jun 3, 2020
@nikku nikku mentioned this issue Jun 3, 2020
@bpmn-io-tasks bpmn-io-tasks bot added needs review and removed ready Ready to be worked on labels Jun 3, 2020
@fake-join fake-join bot closed this as completed in #9 Jun 4, 2020
fake-join bot pushed a commit that referenced this issue Jun 4, 2020
@oguzeroglu
Copy link
Contributor

We've released v3.1.3 containing this fix: https://www.npmjs.com/package/min-dom

Thanks for letting us know about this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spring cleaning Could be cleaned up one day
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants