Closed no-reply closed 7 years ago
Seems like _new
has been in use from the start: https://github.com/projecthydra/curation_concerns/commit/9d8ebf17b761946ab74576def080504d490d5737
This is the link responsible for the behavior in #1050: https://github.com/projecthydra/curation_concerns/blob/master/app/views/curation_concerns/file_sets/_show_actions.html.erb#L2
@dunn thanks! I guess I had misunderstood about this being specific to the "Download This File" link. 052bf28 fixes it for that link.
Rebased and force pushed to more clearly handle the various problems at play, here. I'm happy to break this into multiple PRs, if that's best.
Fixes #1050.
Turbolinks causes xhr requests on local links. For file downloads, this causes browsers to render the contents as text, instead of playing media or displaying the PDF in a viewer. This disables it for the download links.
Related proposed changes:
_new
is not a valid browsing context name in HTML, clients may ignore it. Before disabling turbolinks explicitly, this caused the bad rendering behavior described above in those clients. (44e47e2)_blank
behavior consistent across file download links. (5f8fe1b)data-no-turbolink
calls to the Turbolinks 5 syntax. (2e9a794)@projecthydra/sufia-code-reviewers