allow ctrl-clicking primary tabs

This commit is contained in:
ed 2021-07-15 00:37:14 +02:00
parent 6af4508518
commit bcb353cc30
2 changed files with 10 additions and 4 deletions

View file

@ -167,12 +167,13 @@ ebi('tree').innerHTML = (
function opclick(e) {
ev(e);
var dest = this.getAttribute('data-dest');
goto(dest);
swrite('opmode', dest || null);
if (ctrl(e))
return;
ev(e);
goto(dest);
var input = QS('.opview.act input:not([type="hidden"])')
if (input && !is_touch)

View file

@ -53,6 +53,11 @@ var ebi = document.getElementById.bind(document),
mknod = document.createElement.bind(document);
function ctrl(e) {
return e && (e.ctrlKey || e.metaKey);
}
function ev(e) {
e = e || window.event;
if (!e)