0

I want to query standard HTML textarea which is wrapped by lightning-textarea. How can I get it?


<lightning-textarea name="secret_field" label="Secret" value={secretFieldValue}></lightning-textarea>

3
  • You can't, because of shadow DOM. What do you need it for?
    – Alba Rivas
    Commented Feb 1, 2021 at 12:00
  • @AlbaRivas I need to hide symbols in textarea but if I add css: -webkit-text-security: disc; it applied to label as well Commented Feb 1, 2021 at 12:17
  • Looks like a duplicate of salesforce.stackexchange.com/questions/332903/…
    – POZ
    Commented Feb 1, 2021 at 12:53

1 Answer 1

2

For "secret" inputs, you want to use <lightning-input type="password" />. This provides the default "hidden" input characters as you'd expect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .