Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 3.0 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. The source code to reproduce it
<?xml version="1.0" encoding="utf-8"?>
<mx:Application fontSize="30" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.core.IUITextField;
import mx.core.mx_internal;
use namespace mx_internal;
private function handleMouseClick():void
{ var tf:IUITextField = ti.getTextField(); var index:int = tf.getCharIndexAtPoint(tf.mouseX, tf.mouseY); result.text = "index:" + index.toString(); } ]]
>
</mx:Script>
<mx:TextInput id="ti" x="10" y="10" width="200" text="0123456789ABCDEF" click="handleMouseClick()"/>
<mx:Label id="result" x="10" y="60" text="index:"/>
</mx:Application>
2. Compile and run the code
3. click on char '8', see index:8, move cursor to the right so that horizontal scrolling happened, click on char '8', index changes
4. Note that I also tried tf.getCharIndexAtPoint(tf.scrollH + tf.mouseX, tf.mouseY), that gives me correct result when clicking on '8'
5. But when I click on 'A' to 'F', I get -1, I'm expecting index:10 for A ... index:15 for F
Actual Results:
Expected Results:
Workaround (if any):