JS CTRL click to open a new tab

Hi everyone,

I need to open a new tab when an element is clicked with CTRL.

I can’t use link due to responsive issue.

Is there anyone who knows how to do it in JS with “run javascript” workflow ? I read some forums but it’s not working : simulate ctrl + click with javascript or jquery (to open a new tab without focus) - Stack Overflow


Install the toolbox plugin

Use the action “run JavaScript”

Type the following code

1 Like

Thanks your your answer !

I have already tried but unfortunately it’s not working with CTRL keyboard shortcut. The url doesn’t open…

@thomas.gounot Give your element an ID, then try on page load run JavaScript:

var e = jQuery.Event("click");
e.ctrlKey = true;
$('#your element id').trigger(e);

Im using this one:
Screenshot 2021-05-03 at 09.15.36

This topic was automatically closed after 70 days. New replies are no longer allowed.