
Hi @Petr Binko ,
What do you mean by mouse 3 button
, is it the middle button (scroll wheel) of the mouse?
As far as I know, if you need to disable ctrl+left-click
to open a new tab, you can try to implement it through javascript, a simple example:
let links = document.getElementsByTagName('a');
for (let i = 0; i < links.length; i++) {
links[i].addEventListener('click', function (e) {
if (e.ctrlKey || e.shiftKey) {
e.preventDefault();
return false;
}
});
}
If I understand correctly, add auxclick event can achieve a similar feature to prevent middle click event, like this:
links[i].addEventListener('auxclick', function (e) {
if (e.which === 2 || e.button ===1) {
e.stopPropagation();
e.preventDefault();
return false;
}
})
Hope this can help.
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.