diff --git a/docs/guide/browser/interactivity-api.md b/docs/guide/browser/interactivity-api.md index decb98cc9..fe3a2db6c 100644 --- a/docs/guide/browser/interactivity-api.md +++ b/docs/guide/browser/interactivity-api.md @@ -156,7 +156,7 @@ function fill( ): Promise ``` -Set a value to the `input/textarea/conteneditable` field. This will remove any existing text in the input before setting the new value. +Set a value to the `input`/`textarea`/`contenteditable` field. This will remove any existing text in the input before setting the new value. ```ts import { page, userEvent } from '@vitest/browser/context' @@ -263,7 +263,7 @@ If you don't rely on [special characters](https://testing-library.com/docs/user- The `type` method implements `@testing-library/user-event`'s [`type`](https://testing-library.com/docs/user-event/utility/#type) utility built on top of [`keyboard`](https://testing-library.com/docs/user-event/keyboard) API. -This function allows you to type characters into an input/textarea/conteneditable element. It supports [user-event `keyboard` syntax](https://testing-library.com/docs/user-event/keyboard). +This function allows you to type characters into an `input`/`textarea`/`contenteditable` element. It supports [user-event `keyboard` syntax](https://testing-library.com/docs/user-event/keyboard). If you just need to press characters without an input, use [`userEvent.keyboard`](#userevent-keyboard) API. diff --git a/docs/guide/browser/locators.md b/docs/guide/browser/locators.md index ac514b949..ae108c716 100644 --- a/docs/guide/browser/locators.md +++ b/docs/guide/browser/locators.md @@ -702,7 +702,7 @@ await page.getByRole('img', { name: 'Rose' }).unhover() function fill(text: string, options?: UserEventFillOptions): Promise ``` -Sets the value of the current `input`, `textarea` or `conteneditable` element. +Sets the value of the current `input`, `textarea` or `contenteditable` element. ```ts import { page } from '@vitest/browser/context' diff --git a/packages/browser/context.d.ts b/packages/browser/context.d.ts index c76272c2f..14bef46e8 100644 --- a/packages/browser/context.d.ts +++ b/packages/browser/context.d.ts @@ -380,7 +380,7 @@ export interface Locator extends LocatorSelectors { */ unhover(options?: UserEventHoverOptions): Promise /** - * Sets the value of the current `input`, `textarea` or `conteneditable` element. + * Sets the value of the current `input`, `textarea` or `contenteditable` element. * @see {@link https://vitest.dev/guide/browser/interactivity-api#userevent-fill} */ fill(text: string, options?: UserEventFillOptions): Promise