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

Page disappears after a click on a mailto/download link #7

Open
jonhue opened this issue Mar 28, 2018 · 1 comment
Open

Page disappears after a click on a mailto/download link #7

jonhue opened this issue Mar 28, 2018 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jonhue
Copy link
Owner

jonhue commented Mar 28, 2018

Should have been fixed with 32ce60a.

Because of some reason it's still not working.

The same goes for download links.

@jonhue jonhue added enhancement New feature or request help wanted Extra attention is needed labels Mar 28, 2018
@jonhue jonhue self-assigned this Jul 7, 2018
@jonhue jonhue added bug Something isn't working and removed help wanted Extra attention is needed enhancement New feature or request labels Jul 7, 2018
@jonhue jonhue removed their assignment Sep 4, 2018
@jonhue jonhue added the help wanted Extra attention is needed label Dec 8, 2018
@jonhue jonhue changed the title Page disappears after a click on a mailto link Page disappears after a click on a mailto/download link Dec 8, 2018
@Armarr
Copy link

Armarr commented Jul 30, 2019

We already have to set "data-turbolinks=false" on all download links so that turbolinks doesn't try to interpret the downloaded file as html. Having that attribute to rely on I just added this to your mailto fix and it seems to work:
document.querySelectorAll('a[data-turbolinks=false]').forEach((element) => element.addEventListener('click', () => ignoreBeforeunload = true));
I don't know enough about the internals of Turbolinks or TAnimate to say if this is a generic fix though.

Edit: Just found out the "download" attribute on an anchor is recognised by turbolinks and is probably a better replacement for "data-turbolinks=false".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants