rytm-webflow 2.1.10 → 2.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rytm-webflow",
3
- "version": "2.1.10",
3
+ "version": "2.1.11",
4
4
  "description": "rytm webflow pack - ASwap, ShowUp",
5
5
  "main": "scripts/index.js",
6
6
  "scripts": {
@@ -399,10 +399,10 @@ class ASwapDispatcher extends EventDispatcher {
399
399
  * ### Event handlers ###
400
400
  */
401
401
  onDocumentClick(e) {
402
- if (e.target.tagName !== 'A') {
402
+ const a = e.target.closest('a');
403
+ if (!a) {
403
404
  return;
404
405
  }
405
- const a = e.target
406
406
  if (this.isLinkElementValid(a) && !e.metaKey & !e.ctrlKey) {
407
407
  const useCache = !a.classList.contains(this.noCacheClassName);
408
408
  const url = a.getAttribute("href");