mgsloan / todoist-shortcuts

Browser extension which adds comprehensive keyboard shortcuts to Todoist, beyond what is offered by Todoist itself
MIT License
313 stars 23 forks source link

Add task "Q" does not work (was issue 266, but that one is closed) #270

Open EelkoL opened 7 months ago

EelkoL commented 7 months ago

The Q key does not add a task. I added log output in the comments of issue 266.

holstuwe commented 7 months ago

Copy that. Latest firefox on windows. Log output:

todoist-shortcuts: Couldn't find unique descendant with tag button and passing predicate 
getStack@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:4442:13
warn@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:4425:22
withUniqueTag@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:4645:11
quickAdd/<@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:1396:20
withUniqueClass@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:4612:14
quickAdd@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:1395:20
callBinding/<@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:5214:34
_fireCallback@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/mousetrap.js:634:25
Mousetrap/self._handleKey@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/mousetrap.js:703:34
Mousetrap.prototype.handleKey@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/mousetrap.js:1056:32
Mousetrap/self._handleKeyEvent@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/mousetrap.js:763:18
Mousetrap.prototype.handleKeyEvent@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/mousetrap.js:930:19
genericKeyHandler@moz-extension://e635b3ae-3e7e-40d0-bad6-1390c2ae17cc/todoist-shortcuts.js:5307:24
s@https://todoist.b-cdn.net/assets/vendor~authentication~app~add~electron-login~template-preview-229eafb5.fb809c7a80975a2f7f6982deced94604.js:1:71423
mgsloan commented 6 months ago

Is this still occurring? I don't have the issue with firefox on linux. It'd be very surprising to me if linux vs windows mattered here.

Also, does other extension functionality work? If not, could be related to permissions settings or manifest v3 / using old firefox version

EelkoL commented 6 months ago

Yes, this is still occuring. Other extensions work fine, I use lastpass, diigo, deepl translator, clip to onenote, application launcher for drive (google) and some others. Chrome version is: Chrome is up-to-date Versie 122.0.6261.112 (Officiële build) (64-bits)

EelkoL commented 6 months ago

I disabled all plugins except this one and tried again, same problem:

[watchdog] init
today:42 [watchdog] retrieving last tried CDN: https://d3ptyyxy2at9ui.cloudfront.net/
today:29 [watchdog] saving last tried CDN: https://d3ptyyxy2at9ui.cloudfront.net/
today:198 [watchdog] All assets have reported back; successes: 27; failures: 0
todoist-shortcuts.js:4420 todoist-shortcuts: Waiting for #content div before initializing todoist-shortcuts (this is fine)
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 todoist-shortcuts: Waiting for #content div before initializing todoist-shortcuts (this is fine)
today:1 Third-party cookie will be blocked. Learn more in the Issues tab.
today:1 Third-party cookie will be blocked. Learn more in the Issues tab.
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 todoist-shortcuts: Found content div - initializing todoist-shortcuts! (this is fine)
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 todoist-shortcuts: Loaded options: {mouse-behavior: 'focus-follows-mouse', cursor-movement: 'follows-task-within-section'} (this is fine)
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 

       GET https://app.todoist.com/gcal/prefs/integration 403 (Forbidden)
(anoniem) @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1
(anoniem) @ vendor~authentication~app~add~electron-login~template-preview-cdd60c62.be4ea9d0975f894052a41269cd395f85.js:1
s @ vendor~authentication~app~add~electron-login~template-preview-cdd60c62.be4ea9d0975f894052a41269cd395f85.js:1
(anoniem) @ app-d91a9049.deb71461b379619b274b48557613041f.js:1
ol @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
Ss @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
ss @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
Bo @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
rs @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
ti @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
onStepChange @ app-d91a9049.deb71461b379619b274b48557613041f.js:1
r @ app-d91a9049.deb71461b379619b274b48557613041f.js:1
(anoniem) @ app-d91a9049.deb71461b379619b274b48557613041f.js:1
Promise.then (asynchroon)
(anoniem) @ app-d91a9049.deb71461b379619b274b48557613041f.js:1
await in (anoniem) (asynchroon)
(anoniem) @ app-d91a9049.deb71461b379619b274b48557613041f.js:1
ol @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
Ss @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
(anoniem) @ vendor~authentication~app~add~electron-login~template-preview-059be3de.3ef3f9e52617f0735e634e720082bb0f.js:18
w @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:11
R @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:11
(anoniem) @ vendor~app~add~electron-login.e25f1b6f3bf7142c23503048d509e3da.js:1
O @ vendor~app~add~electron-login.e25f1b6f3bf7142c23503048d509e3da.js:1
P @ vendor~app~add~electron-login.e25f1b6f3bf7142c23503048d509e3da.js:1
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 Sprig: Script setup success.
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 [Sprig] - Invalid userId undefined
(anoniem) @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1
setUserId @ shim.js?id=rm80S56rxeyj:8
push @ shim.js?id=rm80S56rxeyj:1
flush @ shim.js?id=rm80S56rxeyj:1
unpause @ shim.js?id=rm80S56rxeyj:1
n @ shim.js?id=rm80S56rxeyj:8
await in n (asynchroon)
kl @ shim.js?id=rm80S56rxeyj:8
(anoniem) @ shim.js?id=rm80S56rxeyj:8
(anoniem) @ shim.js?id=rm80S56rxeyj:8
8vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 [Sprig] - Disregarding empty attribute / value provided
(anoniem) @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1
setAttribute @ shim.js?id=rm80S56rxeyj:8
push @ shim.js?id=rm80S56rxeyj:1
flush @ shim.js?id=rm80S56rxeyj:1
unpause @ shim.js?id=rm80S56rxeyj:1
n @ shim.js?id=rm80S56rxeyj:8
await in n (asynchroon)
kl @ shim.js?id=rm80S56rxeyj:8
(anoniem) @ shim.js?id=rm80S56rxeyj:8
(anoniem) @ shim.js?id=rm80S56rxeyj:8
today:1 Third-party cookie will be blocked. Learn more in the Issues tab.
vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1 todoist-shortcuts: Couldn't find unique descendant with tag button and passing predicate 
Error
    at getStack (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4443:13)
    at warn (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4426:22)
    at withUniqueTag (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4649:7)
    at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:1397:7
    at withUniqueClass (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4616:14)
    at quickAdd (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:1396:5)
    at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:5218:34
    at _fireCallback (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:634:17)
    at Mousetrap.self._handleKey (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:703:21)
    at Mousetrap.handleKey (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:1056:32)
    at Mousetrap.self._handleKeyEvent (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:763:18)
    at Mousetrap.handleKeyEvent (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:930:19)
    at HTMLDocument.genericKeyHandler (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:5311:24)
    at HTMLDocument.s (https://d3ptyyxy2at9ui.cloudfront.net/assets/vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1:71308)
(anoniem) @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1
warn @ todoist-shortcuts.js:4428
withUniqueTag @ todoist-shortcuts.js:4649
(anoniem) @ todoist-shortcuts.js:1397
withUniqueClass @ todoist-shortcuts.js:4616
quickAdd @ todoist-shortcuts.js:1396
(anoniem) @ todoist-shortcuts.js:5218
_fireCallback @ mousetrap.js:634
Mousetrap.self._handleKey @ mousetrap.js:703
Mousetrap.handleKey @ mousetrap.js:1056
Mousetrap.self._handleKeyEvent @ mousetrap.js:763
Mousetrap.handleKeyEvent @ mousetrap.js:930
genericKeyHandler @ todoist-shortcuts.js:5311
s @ vendor~authentication~app~add~electron-login~template-preview-229eafb5.ffa62893b8f62c4bbcb3fdd77cb2020e.js:1
EelkoL commented 6 months ago

Maybe @holstuwe can provide more information? It would also be interesting to know if this happens to all windows users. I use todoist on my private laptop (W11) and my virtual work PC (W10), problem occurs on both.

holstuwe commented 6 months ago

@EelkoL @mgsloan Can no longer confirm this behaviour. Firefox on Windows 11 (123.0.1 (64-Bit)), Extension version 195. "q" is adding tasks without any problem. Other shortcuts like "j", "k"... are working fine as well.

mgsloan commented 6 months ago

@EelkoL Ahh, I have a theory. I noticed that your logs have (anoniem) and so you are probably using Todoist with Dutch locale. Unfortunately the fix for #266 was to match the button based on the text. Todoist used to have fairly semantic names for buttons to use, but increasingly only has obfuscated class names:

image

So, unfortunately the solution is to switch to the english locale or make a modified version that knows about the dutch localization https://github.com/mgsloan/todoist-shortcuts?tab=readme-ov-file#how-to-customize-keyboard-shortcuts . In the meantime I'd also be happy to just throw in the translated versions of some of these for different languages.

EelkoL commented 5 months ago

You are right that I use the Dutch locale. However, I tested changing that, changed the Windows language, region but also the system locale and the Q button still does nothing. I tried also the Chrome plugin 'Locale Switchter', but nothing. Moved Dutch down in chrome://settings/languages but again, no result. Then I tried the local copy of the todoist-shortcuts plugin, but I don't know what I should change, maybe the quickAdd function?

mgsloan commented 5 months ago

Does the button in Todoist visually use Dutch? I'd only expect the locale change to work if the button also visually changes to "Add task"

Yes it'd be in quickAdd, something like (button) => button.innerText.includes('Voeg taak toe')

EelkoL commented 5 months ago

Your Dutch is not bad at all. The button actually says 'Taak toevoegen'.

Your comment made me try something simple: Change the language in the Todoist settings (in General). That does the trick! My windows is still Dutch, the locale is set to The Netherlands, only Todoist is now in English. And the Q-key works again.

Thanks a lot!