Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
Properly handle inline->docked composer transition
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam committed Dec 1, 2021
1 parent 91323b5 commit 302cda4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/tweetdeckHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ export function onComposerShown(callback: HandlerOf<boolean>) {
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') {
Expand Down

0 comments on commit 302cda4

Please sign in to comment.