fix text selection and cursor position in lines with rtl text

assume a line contain both english text and persian (rtl) text, like this
```
Sample Text متن نمونه sample text
```
atom always look at first rect size of Text Element and calculate position, this cause cursor to  place in wrong position
in our example `Range.getClientRects()` return three rects, look at this pen

http://codepen.io/farnabaz/pen/rWxrGW
This commit is contained in:
Farnabaz
2016-11-11 14:21:41 +03:30
parent 8c91e03420
commit a0529cc4bd

View File

@@ -126,4 +126,4 @@ class LinesYardstick
clientRectForRange: (textNode, startIndex, endIndex) ->
@rangeForMeasurement.setStart(textNode, startIndex)
@rangeForMeasurement.setEnd(textNode, endIndex)
@rangeForMeasurement.getClientRects()[0] ? @rangeForMeasurement.getBoundingClientRect()
@rangeForMeasurement.getBoundingClientRect()