Asana hijacks Ctrl+tab tab cycling
-
With tab cycling enabled, if you Ctrl+tab to Asana, Asana hijacks Ctrl+Tab to cycle between hyperlinks/clickable items on Asana itself.
I found this old archived post reporting the exact issue I'm having. It seems it still hasn't been fixed?
I've filed a bug report about this as well, since this behavior does not occur with Brave (even though that's Chrome-based browswer that is "not supported" by Asana ), Firefox, or Floorp (a "non-supported" fork of Firefox).
-
@VivaldiN00b See https://forum.vivaldi.net/post/459981
Vivaldi works differently compared to other browsers, because of custom shortcuts and one key shortcuts. Many websites steal shortcuts, I don’t think that’s something Vivaldi can fix. But you can stop websites from hijacking shortcuts yourself. -
Thanks, @luetage!
I tried tweaking the blacklist script for my own use case but it doesn't seem to be working. I'm a n00b for Vivaldi, but also Javascript! Do you mind helping me troubleshoot? Here's the script I tried running. I first put it in ViolentMonkey, and then activated developer mode and dragged the text file into
vivaldi://extensions/
with the nameinterceptShortcuts.js
as you suggested in the other thread, but neither worked. The goal of the script is to stop ctrl+tab from being hijacked from Asana.// ==UserScript== // @name Intercept Shortcuts // @homepageURL https://github.com/luetage/intercept-shortcuts // @description Stops websites from hijacking keyboard shortcuts. // @version 0.9 // @match https://app.asana.com/* // @run-at document-start { "use strict"; //const keycodes = ["Control"]; //general blacklist: not currently in use. Add this to if condition if activated: || keycodes.indexOf(e.key) !== -1 document.addEventListener('keydown', e => { console.log(e.key); // Logs the keypress to the console if (e.key === 'Tab' && e.ctrlKey ) { // Specifically negates ctrl + tab console.log('trigger'); // Logs a 'trigger' to console for monitoring e.cancelBubble = true; e.stopImmediatePropagation(); } return false; }) } // ==/UserScript==
-
@VivaldiN00b That’s not a valid userscript. Try to use the original unaltered to see whether it works, then do as little modifications as possible to fit your use case. And the file has to have a
.user.js
extension,.js
won’t work. -
@luetage -- thanks! The
.user.js
change actually got it to load as an extension, so that worked! I tried using the original blacklist version and modifying as little as possible, but it's still not blockingCtrl+Tab
on Asana. Here's the current version of the code, but I also triede.key === 9 && e.ctrlKey
which didn't work either:// ==UserScript== // @name Intercept Shortcuts // @homepageURL https://github.com/luetage/intercept-shortcuts // @description Stops websites from hijacking keyboard shortcuts. // @version 0.9 // @match *://*.asana.com/* // @run-at document-start { 'use strict'; const keycodes = ['CapsLock']; //blacklist document.addEventListener('keydown', e => { console.log(e.key); if (e.key === 'Tab' && e.ctrlKey || keycodes.indexOf(e.key) !== -1) { console.log('trigger'); e.cancelBubble = true; e.stopImmediatePropagation(); } return false; } }
-
@VivaldiN00b That’s not a valid userscript. You need to close the header with
// ==/UserScript==
. I can only help you if you can explain how I can access Asana to trigger the issue. Visiting the landing page Ctrl‐Tab isn’t blocked with the original userscript running. -
@luetage Thanks again. I closed the header as you suggested, deleted and re-uploaded the script to Vivaldi, closed the browser, reopened the browser, and it still doesn't work.
app.asana.com
is the prefix for Asana workspaces, so I'm afraid I can't tell you how to get access if you don't have an Asana account and workspace.Is there a way to monitor outputs or problems with the script that I can post here, perhaps?