Skip to content

Commit

Permalink
[IMP] web: open external links (from PDF viewer) in new tab
Browse files Browse the repository at this point in the history
Currently when we click on external links from a PDF opened in our
PDF viewer, you are redirected to the link, means you are leaving
the record which is not ideal.

With this commit, external links in PDF document will be opened in
new tab so that the opened record is not lost. For that we need to
change the default option of the pdfjs lib, because we cannot pass
this parameter in iframe (link of the documentation is available in
task pad). For that, we changed the value of 'externalLinkTarget'
from 0 (which sets target to NONE) to 2 (which sets target to BLANK)
in 'getDefaultPreferences' function.

taskID-2752002

closes #84594

Signed-off-by: Thibault Delavallee (tde) <[email protected]>
  • Loading branch information
dht-odoo authored and dharmrajsinh-jhala committed Mar 14, 2022
1 parent 8b8eaba commit 74fa91e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/web/static/lib/pdfjs/web/viewer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 74fa91e

Please sign in to comment.