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

fix: deep data attributes scan #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennyschudel
Copy link

In my mind, the common behaviour for "data-no-dragscroll" and "data-dragscroll" would be that it takes the data attributes on the parent elements into account too.

Use closest selector to determine if there is a parent element that contains a data attribute.
Therefore we no longer need to define the data-attribute on every child.

Element.closest does not work with IE11. Needs a polyfill.

@donmbelembe donmbelembe self-requested a review March 21, 2019 07:59
@donmbelembe
Copy link
Owner

is this going to break previous versions ?

@bennyschudel
Copy link
Author

Yes, it is a breaking change because the default behaviour of the inner element will change.

Maybe something vor v2?

If you would like too keep current behaviour we could change it to something like

data-no-dragscroll="all"

or even a new data attribute like.

It does not take into account, that a 'data-dragscroll' could countaint antoher 'data-no-dragscroll'.

@donmbelembe
Copy link
Owner

Okey, you are right, but I need to resolve one issue that is currently on the v1 before going to v2

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

Successfully merging this pull request may close these issues.

2 participants