diff --git a/playwright/support/fixtures/Node.ts b/playwright/support/fixtures/Node.ts index 82160da92ed..3ddd0731807 100644 --- a/playwright/support/fixtures/Node.ts +++ b/playwright/support/fixtures/Node.ts @@ -85,14 +85,18 @@ export class Node { } async move(newName: string) { - await this.page.request.fetch( - `/remote.php/webdav/${this.name}`, - { - headers: { - Destination: `/remote.php/webdav/${newName}`, - }, - method: 'MOVE', - }) + // retry while the file is locked, e.g. by preview generation after saving + await expect(async () => { + const response = await this.page.request.fetch( + `/remote.php/webdav/${this.name}`, + { + headers: { + Destination: `/remote.php/webdav/${newName}`, + }, + method: 'MOVE', + }) + expect(response.status()).toBe(201) + }).toPass({ timeout: 10_000 }) return new Node({ ...this, page: this.page, name: newName }) } diff --git a/src/extensions/CollaborationCaret.ts b/src/extensions/CollaborationCaret.ts index 17755e9453e..527d1402bb8 100644 --- a/src/extensions/CollaborationCaret.ts +++ b/src/extensions/CollaborationCaret.ts @@ -48,6 +48,9 @@ function render(user: AwarenessUser, clientId?: number): HTMLElement { cursor.classList.add('collaboration-carets__caret') cursor.setAttribute('style', `border-color: ${user.color}`) + // The caret sits inside the document text. Hide it from screen readers + // so they don't read the user name in the middle of the text. + cursor.setAttribute('aria-hidden', 'true') const label = document.createElement('div') label.id = `collaboration-carets__label__${clientId}` diff --git a/src/services/SaveService.ts b/src/services/SaveService.ts index 8795da2197b..14c6430a73f 100644 --- a/src/services/SaveService.ts +++ b/src/services/SaveService.ts @@ -135,9 +135,13 @@ class SaveService { if (!this.pendingAutosave) { const wait = nextSaveAttempt - now logger.debug( - `Just saved, will try again in ${Math.ceil(wait)} seconds.`, + `Just saved, will try again in ${Math.ceil(wait / 1000)} seconds.`, ) - this.pendingAutosave = window.setTimeout(this.autosave, wait) + this.pendingAutosave = window.setTimeout(() => { + // Reset so a failing save can schedule the next attempt + this.pendingAutosave = 0 + this.autosave() + }, wait) } return }