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

Drag event on a slide that contains a link #28

Closed
sergiodebei opened this issue Jul 1, 2020 · 8 comments
Closed

Drag event on a slide that contains a link #28

sergiodebei opened this issue Jul 1, 2020 · 8 comments

Comments

@sergiodebei
Copy link

If you drag an element that has link, on mouse up, the link is fired. I tried the "data-keen-slider-pe" but it doesnt seem to solve the issue. Thank you

@rcbyr
Copy link
Owner

rcbyr commented Jul 2, 2020

@sergiodebei
Thanks for the hint. I just fixed it and make a new release. (v5.0.4 - changes in CSS and JS)

@rcbyr rcbyr closed this as completed Jul 2, 2020
@sergiodebei
Copy link
Author

Thank you so much for the quick response. Im gonna use it for some other new projects :)

@Hujjat
Copy link

Hujjat commented Sep 14, 2021

Hey @rcbyr

Just want to let you know, The links are still firing when you drag the slider. I tried data-keen-slider-pe on the link. Not working.

Thanks

@patrickdmccarthy
Copy link

@rcbyr data-keen-slider-pe doesn't seem to work in "keen-slider": "6.4.1" – is there another way around this in the new version?

@rcbyr
Copy link
Owner

rcbyr commented Dec 21, 2021

Hey @patrickdmccarthy,

look at the documentary. https://keen-slider.io/docs#attributes
The attribute name has changed to data-keen-slider-clickable.

Generally, you do not need this attribute for links or buttons. They will work without this attribute. Therefore I will probably rename this attribute soon.

@sagrael
Copy link

sagrael commented Dec 27, 2021

v6.4.1 data-keen-slider-clickable not working on angular + [routerLink]

fixed it like this

::ng-deep {
  .keen-slider[data-keen-slider-moves] .linkClass {
    pointer-events: none;
  }
}

@rcbyr
Copy link
Owner

rcbyr commented Dec 27, 2021

Hey @sagrael

can you create a codesandbox? It works for me.

@danielrob
Copy link

danielrob commented Sep 21, 2022

data-keen-slider-clickable just seems to disable the click events altogether - no drag is now possible. Is it possible to have both drag and no mouseup link click after dragging?

Update: Looks like my timing was just very unlucky - a bug in 6.8.0 fixed in 6.8.1 https://github.com/rcbyr/keen-slider/releases/tag/v6.8.1. It works now without the attribute.

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

6 participants