Add mention of text selection prevention in inert
attribute doc
#33612
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds information to the MDN documentation for the
inert
attribute, specifying that it prevents users from selecting text within the element. This behavior is described as similar to using the CSS propertyuser-select: none
to disable text selection. The commit includes a link to the documentation for theuser-select
CSS property for further reference. Fixes #33611.Description
Added mention of text selection prevention to the documentation for the inert attribute, highlighting its similarity to using the user-select: none CSS property.
Motivation
These changes aim to enhance the clarity and completeness of the documentation for the inert attribute by providing information about its effect on preventing text selection. This addition helps readers understand the full range of behaviors associated with using the inert attribute and how it relates to CSS properties like user-select: none, improving their ability to use this attribute effectively in web development.
Additional details
The
inert
HTML element also prevents the users from selecting the text.https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
Related issues and pull requests
Fixes #33611