enso-carousel
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -56,3 +56,3 @@ export default { | ||
// Add a click handler to all links. Instead we will handle click events | ||
// that bubble up to the container and inspect their originalTarget. | ||
// that bubble up to the container and inspect their target. | ||
// This way we can have slides with links be draggable. | ||
@@ -94,8 +94,9 @@ Array.from(this.links).forEach(link => { | ||
if (!this.linkDragging) { | ||
if (e.originalTarget.tagName === "A") { | ||
window.location = e.originalTarget.href; | ||
if (e.target.tagName === "A") { | ||
window.location = e.target.href; | ||
return; | ||
} | ||
// This is also handles, e.g. clicking an image within a link. | ||
let closest_link = e.originalTarget.closest("a"); | ||
let closest_link = e.target.closest("a"); | ||
@@ -134,3 +135,3 @@ if (closest_link) { | ||
// drag didn't pass the threshold. | ||
if (this.isTargetWithinSlide(e.originalTarget)) { | ||
if (this.isTargetWithinSlide(e.target)) { | ||
this.linkDragging = true; | ||
@@ -137,0 +138,0 @@ } |
{ | ||
"name": "enso-carousel", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "A renderless Vue component carousel.", | ||
@@ -5,0 +5,0 @@ "main": "js/EnsoCarousel.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221
11388