Don't interfere with CMD-click or CTRL-click

Steps to reproduce

  1. Zoom a few nodes into a document so that you get breadcrumb navigation links at the top of the document.
  2. CMD-click or CTRL-click (depending on your operating system) one of the links in the breadcrumb navigation.

Expected result

A new tab should open with that link.

Actual result

The current tab navigates to the link.

Environment

Which operating system are you using?
Mac OSX

Which browser are you using?
Chrome

If you’re using a desktop or mobile app, what’s the version number of Dynalist?
Not an app. I’m using the browser.

Are you using any third-party scripts for Dynalist, e.g. PowerPack?
No.


Additional information

The breadcrumb links have event handlers attached to them and these event handlers don’t account for the case where the CMD or CTRL key is being held down while clicking. This can be fixed easily by checking the event property evt.ctrlKey (it’s the same name on all operating systems):


As simple as this:
if (evt.ctrlKey) {
return true;
}
else {
return yourCurrentFunctionCall(params);
}

Sounds like a valid use case, we can add that in.

1 Like

It’s a little more than just a valid use case. CTRL-clicking a link is one of the features of every browser on every operating system. It’s one of the core habits of browsing the web! It’s not something a website should break without a veeeeery good reason.

The event handler was put in place originally to prevent a full page reload when you click on any navigation links. Either way, middle click still works apparently!

1 Like

Should be fixed now.

Yep, it works now. Thank you!

1 Like