Right to left for documents in other languages

When selecting text in documents that are meant to be read right to left (Hebrew), margin note doesn’t select properly. It thinks that it is left to right.