vue-dragscroll icon indicating copy to clipboard operation
vue-dragscroll copied to clipboard

fix: deep data attributes scan

Open bennyschudel opened this issue 5 years ago • 3 comments

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.

bennyschudel avatar Mar 20 '19 15:03 bennyschudel

is this going to break previous versions ?

donmbelembe avatar Mar 23 '19 08:03 donmbelembe

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'.

bennyschudel avatar Mar 23 '19 09:03 bennyschudel

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

donmbelembe avatar Jun 23 '19 04:06 donmbelembe