Add delay to auto_download.js

Created on 7 December 2023, about 1 year ago

Problem/Motivation

We ran into an issue where the auto_download.js was conflicting with js that controlled accordions on our page. It seemed that the auto_download.js was probably getting executed before the accordion script had a chance to fully initialize.

Proposed resolution

I created a patch that adds a delay of 1 second to auto_download.js and our accordions now work normally.

if (link.dataset.downloadEnabled === 'true') {
  setTimeout(function() {
    location.href = link.href;
  }, 1000);
}

This probably isn't a widespread issue but thought I would add a patch for it just in case someone else ran into a similar issue.

πŸ› Bug report
Status

Active

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phernand42

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024