CompositionArea: Don't unconditionally apply draft contents if empty

This commit is contained in:
Scott Nonnenberg 2023-04-17 13:50:29 -07:00 committed by GitHub
parent cdc68d1c34
commit f93b4235d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 12 deletions

View file

@ -10,7 +10,6 @@ import type {
IPCResponse as ChallengeResponseType,
} from '../challenge';
import type { ReceiptType } from '../types/Receipt';
import { sleep } from '../util/sleep';
export type AppLoadedInfoType = Readonly<{
loadTime: number;
@ -62,7 +61,7 @@ export class App extends EventEmitter {
this.privApp.on('close', () => this.emit('close'));
}
public async waitForEnabledComposer(sleepTimeout = 1000): Promise<Locator> {
public async waitForEnabledComposer(): Promise<Locator> {
const window = await this.getWindow();
const composeArea = window.locator(
'.composition-area-wrapper, .conversation .ConversationView'
@ -72,9 +71,6 @@ export class App extends EventEmitter {
);
await composeContainer.waitFor();
// Let quill start up
await sleep(sleepTimeout);
return composeContainer.locator('.ql-editor');
}