HTMLElement: writingSuggestions property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The writingSuggestions property of the HTMLElement interface is a string indicating if browser-provided writing suggestions should be enabled under the scope of the element or not.

It reflects the value of the writingsuggestions HTML global attribute.

Value

An enumerated value; possible values are:

"true"

The browser automatically shows the virtual keyboard when the user taps or focuses the element.

"false"

The browser does not automatically show the virtual keyboard: showing/hiding the virtual keyboard is handled manually by the script.

Examples

The following example shows how to disable writing suggestions offered by user agents via script:

js
const element = document.querySelector("input");

// disable user agent writing suggestions
element.writingSuggestions = "false";

Specifications

Specification
HTML
# dom-writingsuggestions

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
writingSuggestions
Chrome – Full support
Chrome 124 (Release date: 2024-04-16)
footnote Full support
Edge – Full support
Edge 124 (Release date: 2024-04-18)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1871621
Opera – Full support
Opera 110 (Release date: 2024-05-14)
footnote Full support
Safari – Full support
Safari 18 (Release date: 2024-09-16)
footnote Full support
Chrome Android – Full support
Chrome Android 124 (Release date: 2024-04-16)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1871621
Opera Android – Full support
Opera Android 82 (Release date: 2024-05-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 18 (Release date: 2024-09-16)
footnote Full support
Samsung Internet – Full support
Samsung Internet 27 (Release date: 2024-11-06)
footnote Full support
WebView Android – Full support
WebView Android 124 (Release date: 2024-04-16)
footnote Full support
WebView on iOS – Full support
WebView on iOS 18 (Release date: 2024-09-16)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also