Steps to reproduce:
- Type something in a LTR language (e.g., English).
- Decide that the next sentence should be RTL (e.g., Hebrew).
- Choose the "Language" item from the character styling menu.
- Try to change the language. Or just to get rid of the box.
- Give up and lose all work.
This looks related to T153356: Using browser functions to switch input direction is impossible in the new wikitext editor by @Amire80, but I think it's a separate bug.