Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipient_change hook throws console errors when compose is closed #775

Open
arturs-buls opened this issue Jan 24, 2024 · 0 comments
Open

Comments

@arturs-buls
Copy link

Summary

recipient_change errors out when compose, that has recipients, gets closed.

Steps to reproduce

  1. Setup recipient_change observer
  2. Open compose. Put some recipient in.
  3. Close that compose
  4. Observe gmail-inject.js:8009 Can't find composeRoot for [object Object] and api.dom.compose called with invalid element thrown in console

Stack trace


gmail-inject.js:8009 Can't find composeRoot for [object Object]
Gmail.api.tools.error @ gmail-inject.js:8009
(anonymous) @ gmail-inject.js:9372
setTimeout (async)
handler @ gmail-inject.js:9363
(anonymous) @ gmail-inject.js:9321
each @ gmail-inject.js:431
Gmail.api.observe.trigger_dom @ gmail-inject.js:9320
(anonymous) @ gmail-inject.js:9478
gmail-inject.js:8009 api.dom.compose called with invalid element
Gmail.api.tools.error @ gmail-inject.js:8009
Gmail.api.dom.compose @ gmail-inject.js:10446
(anonymous) @ gmail-inject.js:9374
setTimeout (async)
handler @ gmail-inject.js:9363
(anonymous) @ gmail-inject.js:9321
each @ gmail-inject.js:431
Gmail.api.observe.trigger_dom @ gmail-inject.js:9320
(anonymous) @ gmail-inject.js:9478

I guess it might be some race condition, due to setTimeout, but maybe there is a way to check if compose still exist in setTimeout callback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant