Skip to content

unable to use TextArea.setSelectionRange(0,0) #1260

@sanjeev-rajput

Description

@sanjeev-rajput

i am unable to use setSelectionRange(0,0) on a textarea component
tried on both jewel and spectrum

tried all these option
input.text = ""; // Clear the box
input.focus();// Set focus
above two works fine

  1. input.element.setselectionRange(0, 0); // - NOT ACCEPTING
  2. document.getElementById("input").setSelectionRange(0, 0); // - NOT ACCEPTING
  3. var nativeInput:* = input.element as Object;
    if (nativeInput && nativeInput.setSelectionRange != null) {
    nativeInput.setSelectionRange(0, 0);
    }

tried all 3 options none works - plz suggest some

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions