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

AttachToDom stale in dist #110

Open
13protons opened this issue Jun 11, 2019 · 1 comment
Open

AttachToDom stale in dist #110

13protons opened this issue Jun 11, 2019 · 1 comment

Comments

@13protons
Copy link

The dist folder has an old build which ignores the appendTo parameter. Can you please update and publish so this works as expected from NPM?

From dist https://github.com/chrisdavies/tiny-date-picker/blob/master/dist/tiny-date-picker.js#L674

attachToDom: function () {
    document.body.appendChild(dp.el);
},

From src https://github.com/chrisdavies/tiny-date-picker/blob/master/src/mode/base-mode.js#L32

attachToDom: function () {
    opts.appendTo.appendChild(dp.el);
}
@13protons
Copy link
Author

Fun fact - this was discovered while trying to use TDP inside an angular app that had been added to a shadowDom using their ViewEncapsulation.ShadowDom option. The date picker styles are inside the shadow root, but TDP attaches itself to the body and therefore can't pick up and use the styles.

Probably nobody noticed when their custom appendTo element failed because the dropdown would still work on a page without the shadowDom boundary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant