0

I can't check textarea is focused or not. I'll try with following code but it does't work.

    const msg_area = document.getElementById('msg-area') as HTMLInputElement;
    if (msg-area.hasFocus()) {
        // somecode
    }

But it doesnot work. There was an error that hasFocus() not found. hasFocus() not a property of HtmlInputElement.

Santanu
  • 63
  • 1
  • 3
  • 8

0 Answers0