Cursor not focusing when toggling ON Leo AI tab

Description of the issue:
When toggling ON the Leo AI tab on the sidebar, the cursor doesn’t automatically focus on the text-box, which makes it a bit troublesome having to select the text-box whenever I toggle the Leo AI tab ON.

How can this issue be reproduced?

  1. Launch Brave
  2. Press ‘Ctrl + b’ on the keyboard (or the shortcut to open the Leo AI tab on the sidebar)
  3. Type a search term on the keyboard without selecting the text-box in the Leo AI chat.

Expected result:
The text isn’t being entered into the text-box unless you manually select the text-box.

Brave Version( check About Brave):
Version 1.67.119 Chromium: 126.0.6478.114 (Official Build) unknown (64-bit)

Additional Information:
I am on Linux Mint Cinnamon 21.2.
If the code for Leo AI Chat tab is written in HTML, I think simply adding ‘autofocus’ in the element would work. (e.g.

Additionally, the cursor focus on the text-box should be removed (if possible) when you toggle OFF the Leo AI Chat tab, otherwise, it might cause a few issues when you start typing again.