-
Notifications
You must be signed in to change notification settings - Fork 8
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
Comments
Please use our existing but report template and include the concrete steps to reproduce your issue, preferibly a CodeSandbox or HTML snippet. |
This comment has been minimized.
This comment has been minimized.
@oguzeroglu Could you have a look if that is the case? |
If so, we should release a proper version with rebuilt, fixed distributions. |
npm install min-dom:3.1.2 |
We've released v3.1.3 containing this fix: https://www.npmjs.com/package/min-dom Thanks for letting us know about this issue! |
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
The text was updated successfully, but these errors were encountered: