diff --git a/playwright/support/fixtures/Node.ts b/playwright/support/fixtures/Node.ts index f53ea4737ec..1fccf2e8bfb 100644 --- a/playwright/support/fixtures/Node.ts +++ b/playwright/support/fixtures/Node.ts @@ -32,15 +32,19 @@ export class Node { } async move(newName: string) { - await this.page.request.fetch( - `/remote.php/webdav/${this.name}`, - { - headers: { - Destination: `/remote.php/webdav/${newName}`, + // 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', }, - 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 47f7afa22fe..d9286e00553 100644 --- a/src/extensions/CollaborationCaret.ts +++ b/src/extensions/CollaborationCaret.ts @@ -47,6 +47,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 99fcef1644d..d6a9ea436de 100644 --- a/src/services/SaveService.ts +++ b/src/services/SaveService.ts @@ -127,8 +127,12 @@ class SaveService { if (now < nextSaveAttempt) { if (!this.pendingAutosave) { const wait = nextSaveAttempt - now - logger.debug(`Just saved, will try again in ${Math.ceil(wait)} seconds.`) - this.pendingAutosave = window.setTimeout(this.autosave, wait) + logger.debug(`Just saved, will try again in ${Math.ceil(wait / 1000)} seconds.`) + this.pendingAutosave = window.setTimeout(() => { + // Reset so a failing save can schedule the next attempt + this.pendingAutosave = 0 + this.autosave() + }, wait) } return }