The database gets confused by Hebrew text entries, because it switches between left to right and right to left text entry direction. That leads to confusing entries in fields like the one attached where the hebrew text and the latin/arabic text/numbers get mixed up. I thought I mention this here. Also if you press the left arrow button in a Hebrew text the cursor goes right and for the right arrow button the cursor goes left...kind of confusing.
Hi Sara, thanks for you feedback!
The problem is the browser, no the site: it tries to guess how it should handle text direction, and in this case it is wrong. Usually browsers seem to get it right, but in an input field adding something in brackets gives this strange effect. In normal HTML mode it works fine:
לשיר ידעת (123)
When editing it, it shows the closing brace LTR instead of RTL.
First you have the Hebrew, which is RTL, then you have a opening brace. RTL is kept. Then you have digits which are LTR. However these digits are in an RTL context, so they are shown on the right. Afterwards you have the closing brace. This closing brace seems to trigger a full LTR context and is shown on the right, unlike the digits.
However, if more text follows, the closing brace is again in an LTR context and always shown correctly, also in input fields:
לשיר ידעת (123) ל
As for the cursor, this is also the default behavior of your browser. The right arrow always advances one character. In case of RTL it means going to the left.
In this case, a solution would be to avoid adding the internal ID to the database entity, but there are other instances where we do this, e.g. differentiating between artists with the same name. A solution there would be to use latin text instead of digits for differentiating (hebrew text in brackets also gives strange results)