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 #266

Closed varunthepianoman closed 8 months ago

varunthepianoman commented 8 months ago

In chrome, adding tasks via "Q" does not work when extension is enabled.

I disabled the extension, and then it works again.

grational commented 8 months ago

This is what the console reports pressing q on Firefox 121:

todoist-shortcuts: Couldn't find unique descendant matching query button[data-track="navigation|quick_add"], nav a[aria-label="Add task"] , instead got null 
getStack@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/todoist-shortcuts.js:4408:13
warn@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/todoist-shortcuts.js:4391:22
withUnique@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/todoist-shortcuts.js:4472:11
quickAdd@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/todoist-shortcuts.js:1413:15
callBinding/<@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/todoist-shortcuts.js:5178:34
_fireCallback@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/mousetrap.js:634:25
Mousetrap/self._handleKey@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/mousetrap.js:703:34
Mousetrap.prototype.handleKey@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/mousetrap.js:1056:32
Mousetrap/self._handleKeyEvent@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/mousetrap.js:763:18
Mousetrap.prototype.handleKeyEvent@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/mousetrap.js:930:19
genericKeyHandler@moz-extension://efba3268-982e-47a0-8888-5cda4a9d99fe/todoist-shortcuts.js:5271:24
r@https://todoist.b-cdn.net/assets/vendor~authentication~app~add~electron-login-229eafb5.b46f846d93fe86783f9c8c1e306af12c.js:1:9401
vendor~authentication~app~add~electron-login-229eafb5.b46f846d93fe86783f9c8c1e306af12c.js:1:229801
Franklin-jhf commented 8 months ago

Will probably just need to update this method here to fix it: https://github.com/mgsloan/todoist-shortcuts/commit/a9af55a215fe772b7ba2339a72d910829849e806

EelkoL commented 8 months ago

The Q-key does not work for me as well, on Chrome. Tested it again today.

mgsloan commented 8 months ago

@EelkoL I believe this was fixed a few weeks ago in version 191. Can you please check that your extension version is up to date?

If still not working is there any output in the developer console about it?

EelkoL commented 8 months ago

@mgsloan The version I'm using is 192. I see this in de developer console when I press q:

vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 todoist-shortcuts: Couldn't find unique descendant with tag button and passing predicate Error at getStack (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4451:13) at warn (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4434:22) at withUniqueTag (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4654:7) at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:1395:7 at withUniqueClass (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4621:14) at quickAdd (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:1394:5) at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:5226: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:5319:24) at HTMLDocument.s (https://d3ptyyxy2at9ui.cloudfront.net/assets/vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1:67787) (anoniem) @ vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 warn @ todoist-shortcuts.js:4436 withUniqueTag @ todoist-shortcuts.js:4654 (anoniem) @ todoist-shortcuts.js:1395 withUniqueClass @ todoist-shortcuts.js:4621 quickAdd @ todoist-shortcuts.js:1394 (anoniem) @ todoist-shortcuts.js:5226 _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:5319 s @ vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1

This is what the console output is on loading the page:

today:23 [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: 24; failures: 0 vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 todoist-shortcuts: Waiting for #content div before initializing todoist-shortcuts (this is fine) vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 todoist-shortcuts: Waiting for #content div before initializing todoist-shortcuts (this is fine) vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 todoist-shortcuts: Found content div - initializing todoist-shortcuts! (this is fine) vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.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-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 Sprig: Script setup success. today:1 Error handling response: TypeError: Cannot read properties of undefined (reading 'url') at Ya (chrome-extension://pnhplgjpclknigjpccbcnmicgcieojbh/js/content/diigolet.js:4:24) at Object.cb_bm_loadBookmark_success (chrome-extension://pnhplgjpclknigjpccbcnmicgcieojbh/js/content/diigolet.js:142:141) at chrome-extension://pnhplgjpclknigjpccbcnmicgcieojbh/js/content/diigolet.js:336:441 vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 [Sprig] - Invalid userId undefined (anoniem) @ vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 setUserId @ shim.js?id=rm80S56rxeyj:704 push @ shim.js?id=rm80S56rxeyj:704 flush @ shim.js?id=rm80S56rxeyj:704 unpause @ shim.js?id=rm80S56rxeyj:704 n @ shim.js?id=rm80S56rxeyj:704 await in n (asynchroon) Xg @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 3vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 [Sprig] - Disregarding empty attribute / value provided (anoniem) @ vendor~authentication~app~add~electron-login-229eafb5.9dd1d2bce0524b0f6bd31a7d4d9df52a.js:1 setAttribute @ shim.js?id=rm80S56rxeyj:704 push @ shim.js?id=rm80S56rxeyj:704 flush @ shim.js?id=rm80S56rxeyj:704 unpause @ shim.js?id=rm80S56rxeyj:704 n @ shim.js?id=rm80S56rxeyj:704 await in n (asynchroon) Xg @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 shim.js?id=rm80S56rxeyj:19 Refused to load the script 'https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js' because it violates the following Content Security Policy directive: "script-src 'self' https://*.todoist.com https://todoist.com 'nonce-I6akNutOOwzoDGLoZ_WvJ4apckaD65P3047LeMBvsh8' https://www.googletagmanager.com https://snippet.growsumo.com https://challenges.cloudflare.com https://todoist.b-cdn.net https://d3ptyyxy2at9ui.cloudfront.net https://dcff1xvirvpfp.cloudfront.net https://d266vjxpnndrqi.cloudfront.net https://js.stripe.com https://maps.googleapis.com https://maps.gstatic.com https://www.dropbox.com/static/api/2/dropins.js https://tagmanager.google.com https://*.google-analytics.com https://*.analytics.google.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

(anoniem) @ shim.js?id=rm80S56rxeyj:19 Kh @ shim.js?id=rm80S56rxeyj:19 Gh @ shim.js?id=rm80S56rxeyj:19 await in Gh (asynchroon) n @ shim.js?id=rm80S56rxeyj:704 await in n (asynchroon) Xg @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 shim.js?id=rm80S56rxeyj:19

   POST https://app.todoist.com/app/csp_report 405 (Method Not Allowed)

(anoniem) @ shim.js?id=rm80S56rxeyj:19 Kh @ shim.js?id=rm80S56rxeyj:19 Gh @ shim.js?id=rm80S56rxeyj:19 await in Gh (asynchroon) n @ shim.js?id=rm80S56rxeyj:704 await in n (asynchroon) Xg @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 (anoniem) @ shim.js?id=rm80S56rxeyj:704 31Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received