instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.57k stars 2.47k forks source link

Links in PDF preview don't work. #2256

Open GGIEnrike opened 1 year ago

GGIEnrike commented 1 year ago

Summary:

Links don't work in PDFs. Clicking them doesn't result in anything, even though they are highlighted on hover, which is less common for PDF viewers to do.

Steps to reproduce:

  1. Open any PDF in file preview.
  2. Find any link in that PDF (common in contents section of documents, try this file on page 3) and hover over it. The text should turn yellow to indicate that.
  3. Click the link.

    Expected behavior:

    Clicking links should result in the page being changed to whatever the link points to. Opening in macOS Preview or Chrome results in this behavior, which is a good standard. (Note, both softwares, however, don't highlight the links like Canvas does.)

    Actual behavior:

    Nothing happens.

    Additional notes:

    The fact that links get highlighted means that the functionality was either there and got removed somehow, or that Canvas suppresses underlying library's functionality (it may be easy to fix it if this is the case, maybe it's just an event you forgot you were preventDefault-ing?).