Whenever I am typing in Arabic, the cursor skips to the beginning of the line because if it were written from left to right, that would be where I last typed.
How can I fix that?
Your software is considering the space character to be ltr and text rtl. In this situation the jumping cursor behavior is correct, at least according these bidi guidelines (section 24 which is ... educational). Thus, you need to instruct your software to insert the space at the correct bidi level.
For OpenOffice.org I found these instructions to work, even though they are quite old. In short, go to
Other software might not have this setting available (I couldn't find anything for firefox). The trick mentioned in the previous link should work (adding the non-visible RLM character U+200F), but this is probably too cumbersome in practice.