I work with bi-directional text day and night. The problem you are describing is a layout problem, not the text selection problem. Basically, direction natural symbols that can be used in RTL and LTR both languages (such as !, ", and ', but not the opening and closing quotation marks thare used in word processors) have confusion when they appear in the middle of RTL and LTR text. BiDi layout algorithms use preferential attachment mechanisms to address this issue which in some rare cases cannot have a perfect solution. Similarly, direction aware symbols that can be used in both RTL and LTR languages have a different type of issue. Take the example of parenthesis ( and ), if one considers them as open and close parenthesis respectively, then a multilingual Unicode font cannot meaningfully accommodate them to serve LTR and RTL languages. Because open parenthesis will look like a closing parenthesis in RTL languages. Open/close or start/end are direction aware words that change their direction depending upon the direction of text flow of the language in question, on the other hand, left/right are fixed names, so if those characters are defined as left and right parenthesis respectively then their usage in any language will be unambiguous. Another approach will be to introduce two sets of open and close parenthesis in Unicode character map, one pair for RTL and the other pair for LTR.
Having said that, those problems are related to layout and our browsers already do a great job of dealing with bidirectional text, even in rich text editors, if appropriate “direction” and “unicode-bidi” CSS properties are set. https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi
Cursor movement and text highlight just needs to follow the flow of character stream and let the location of those characters be recognized by the layout engine.