Page 1 of 1

Topicref with external target doesn't open in new browser tab

Posted: Wed Sep 11, 2019 12:11 am
by rjcbop
We're generating webhelp responsive output and want a TOC item that links to a PDF which will then open in a new browser tab. We tried a topicref element, setting the target to the URL for the PDF (the PDF is hosted on an external server). Although the scope of the topicref is set to external, the PDF opens in the same tab as the webhelp responsive output.

For example, we have something like the following topicref in our map:

<topicref href="URL to our PDF" format="pdf" scope="external" navtitle="Link to a PDF"/>

We did notice that if we use an xref for the PDF, and set the scope to external, then the PDF opens in a separate tab, since in that case the generated HTML has the target="_blank" setting. However, we'd like to avoid creating a topic that contains only a link to a PDF.

Is there a way to achieve what we're trying to accomplish?

Re: Topicref with external target doesn't open in new browser tab

Posted: Wed Sep 11, 2019 10:38 am
by Costin
Hello,

We tested this behavior but we could not reproduce the reported issue - the PDF resource opens in its own separate tab, both when it is referred by the topicref element through xref and through href.
This is also the default behavior in the latest version of oXygen.

What specific version of oXygen are you using? It could have been an issue with opening external resources in a new tab that affected old versions of oXygen, but this no longer occurs with newer versions.
Also, is your WebHelp output local, on your machine, or is it stored on a web server?

In case you can still reproduce the issue even if you use the latest version available on our website, you should send us (support@oxygenxml.com) a sample DITA Map in an as minimal form as possible, that you could use to reproduce the issue, so we could take a look at it and see what goes wrong.

Regards,
Costin

Re: Topicref with external target doesn't open in new browser tab

Posted: Wed Sep 11, 2019 7:34 pm
by rjcbop
Thanks for testing it out so quickly. I've isolated the issue to the case where the topicref that links to the PDF is nested under a topic (or topichead). The link on the main page of the help works fine (opens up in a separate tab), but if you drill down into the topic that contains the child PDF topicref (see image below), the link in the left-hand TOC doesn't open up in a separate tab.
pdf_link.png
pdf_link.png (10.45 KiB) Viewed 1971 times
For reference, we're using build 2019022122 of the DITA-OT, that's bundled with oXygen 21.0. And the WebHelp output is on my local machine. And here's a trivial sample map:

<map id="m_test">
<title>Test map</title>
<topicref href="c_test_parent_topic.dita">
<topicref href="URL to PDF" format="pdf" scope="external" navtitle="PDF link"/>
</topicref>
</map>

Thanks!

Re: Topicref with external target doesn't open in new browser tab

Posted: Thu Sep 12, 2019 11:22 am
by ionela
Hi,

Thank you for all these details.
We've managed to reproduce the problem on our side and I have logged it to our issue tracking tool. This will be further analyzed by our development team.
We'll update the thread when the bugfix becomes available.

Regards,
Ionela

Re: Topicref with external target doesn't open in new browser tab

Posted: Mon Mar 27, 2023 3:03 pm
by cosmin_andrei
Hi,
I just wanted to let you know that this issue is fixed now, and the fix is available in the latest version of Oxygen, version 25.1 which we released last week.
https://www.oxygenxml.com/download.html

Please let us know if you encounter further problems with this new version.

Re: Topicref with external target doesn't open in new browser tab

Posted: Tue Apr 04, 2023 7:06 pm
by rjcbop
Thank you!