Tabs does not insert spaces but changes pane

Problem description:
while typing and after like 10 minutes the tab does not add tabs/spaces but moves to the the next pane.
exiting the repl solved the issue

Expected behavior:
inserts a tab (or spaces)

Actual behavior:
Moves to the next pane

Steps to reproduce:
Create a repl and start programming

Bug appears at this link:

MacBook Pro, BigSur, Safari

UPDATE: this is worse. On safari enter inserts a line without moving the cursor down, and so much more. Is reply this broken on safari for Mac? On the iPad it was ok.