denehyg / reveal.js-menu

Slide out menu for reveal.js
https://denehyg.github.io/reveal.js-menu
MIT License
281 stars 76 forks source link

External links in the menu from external source open 2 tabs #32

Closed jcamp closed 7 years ago

jcamp commented 7 years ago

When you use an external file of links, each link opens the link twice.

You have target="_blank", so tried taking this out, which opens the target in the current tab - thought it might get rid of the extra tabs opening - but no.

Basically two tabs are opening instead of one new tab...

denehyg commented 7 years ago

Well that's clearly annoying. I'm not really sure what's going on here, but I don't think has anything to do with reveal.js-menu itself (I'm happy for others to prove me wrong).

If I change the target for each of the external links to something different it works as expected for me across Chrome, Firefox and Safari under macOS, eg

<li class="slide-menu-item"><a href="https://github.com/denehyg/reveal.js-menu" target="_a">Reveal.js-menu source</a></li>
<li class="slide-menu-item"><a href="https://github.com/hakimel/reveal.js" target="_b">Reveal.js</a></li>

I've removed the target attr from the examples for now. The argument could be made that it should be up to the user to decide on using new tabs anyway, although I see use cases for either way.

jcamp commented 7 years ago

Cheers. It was a wee bit annoying....

jcamp commented 6 years ago

Hi another thing...

Is there a way to make a menu item just a link to an external url?

By that I mean embed in the main menu structure a menu item that when clicked just opens the url (new tab preferably)?

Sounds easy but with the section structure I could not find a simple way to do this and do not want to load a list of links into another menu.