From 302cda48b9fcbee33130eb0b370fa01e96dc23ba Mon Sep 17 00:00:00 2001 From: Damien Erambert Date: Tue, 30 Nov 2021 17:04:23 -0800 Subject: [PATCH] Properly handle inline->docked composer transition --- src/helpers/tweetdeckHelpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/tweetdeckHelpers.ts b/src/helpers/tweetdeckHelpers.ts index a6c2e3d71..467f41b8b 100644 --- a/src/helpers/tweetdeckHelpers.ts +++ b/src/helpers/tweetdeckHelpers.ts @@ -167,7 +167,8 @@ export function onComposerShown(callback: HandlerOf) { let isVisible: boolean | undefined = undefined; const composerObserver = new MutationObserver(() => { - const tweetCompose = drawer?.querySelector('textarea.js-compose-text'); + const tweetComposers = drawer?.querySelectorAll('textarea.js-compose-text') || []; + const tweetCompose = tweetComposers.length !== 1 ? undefined : tweetComposers[0]; if (!tweetCompose) { if (isVisible === true || typeof isVisible === 'undefined') {