MouseEvent.CLICK on a TextField doesn't work

Bug #1225529 reported by Fabian Ebner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lightspark
Fix Committed
Undecided
Unassigned

Bug Description

package {
        import flash.display.Sprite;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.events.MouseEvent;

        public class buttonClick extends Sprite {
                private var tf:TextField = new TextField();

                public function buttonClick() {
                        tf.text = "START";
                        tf.autoSize = TextFieldAutoSize.LEFT;
                        tf.addEventListener(MouseEvent.CLICK, clickHandler);
                        this.addChild(tf);
                }

                private function clickHandler(e:MouseEvent):void {
                        tf.text = "WHY";
                }
        }
}

When clicking on the TextField nothing happens (with Adobe Flash, the text changes to "WHY"). If you add the EventListener to the class itself, the click event gets registered.

Fabian Ebner (fox6x6x6)
description: updated
Revision history for this message
Antti Ajanki (aajanki) wrote :

Fixed by a patch on github (I guess you were the author of the patch).

Changed in lightspark:
status: New → Fix Committed
Revision history for this message
Fabian Ebner (fox6x6x6) wrote :

> I guess you were the author of the patch

Yes, it was me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.