diff --git a/files/en-us/web/api/htmlinputelement/setselectionrange/index.md b/files/en-us/web/api/htmlinputelement/setselectionrange/index.md index 93284b9a9b720c3..5e9ce1a8e6e98dd 100644 --- a/files/en-us/web/api/htmlinputelement/setselectionrange/index.md +++ b/files/en-us/web/api/htmlinputelement/setselectionrange/index.md @@ -12,6 +12,8 @@ The **`HTMLInputElement.setSelectionRange()`** method sets the start and end positions of the current text selection in an {{HTMLElement("input")}} or {{HTMLElement("textarea")}} element. +Note that the element must be focused for the call to have any effect. + Optionally, in newer browser versions, you can specify the direction in which selection should be considered to have occurred. This lets you indicate, for example, that the selection was set by the user clicking and dragging from the end of the selected text