Bugs in FlowComposerBase
I've run across what appear to be a few bugs in FlowComposerBase.
First of all, the findLineAtPosition method has a preferPrevious:Boolean=false optional parameter. That parameter is not passed to the findLineIndexAtPosition call used within the findLineAtPosition method to look up the line index. Is this a simple oversight?
Secondly, in the findLineIndexAtPosition method, if we cannot locate appropriate TextFlowLine object for the requested absolutePosition, we return '_lines.length'. That will never be a valid line index. Because of this condition, passing textFlow.textLength to either findLine or findLineIndex will always result in a runtime exception, as far as I can tell. Should it be returning '_lines.length - 1' instead, or is there more to this than I'm realizing?
We are reproducing the exception by pasting 10 characters of text into an empty text flow and then immediately hitting the END key. Exception is thrown in NavigationUtil.endOfLine() method.
Any thoughts?
Thanks,
Brent Arndorfer
