Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-25414

KeyboardEvent does not fire when removeing a button from stage right away after being clicked

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.5 (Release)
    • None
    • mx: Button
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="init(event)">
      <mx:Script>
      <![CDATA[
      import flash.events.Event;
      import flash.events.KeyboardEvent;
      import flash.events.MouseEvent;
      import flash.ui.Keyboard;
      private function init(event:Event):void

      { stage.addEventListener(KeyboardEvent.KEY_DOWN,onKeyDown) }

      private function onKeyDown(e:KeyboardEvent):void

      { trace(e.keyCode); }

      private function onClick(event:MouseEvent):void

      { this.removeChild(btn); }

      ]]
      >
      </mx:Script>
      <mx:Button id="btn" label="Button" click="onClick(event)"/>
      </mx:Application>

      Actual Results:
      After click the "Button" button,KeyboardEvent.KEY_DOWN does not fire unless you click the flash again.

      Expected Results:
      KeyboardEvent.KEY_DOWN should fires and we can trace the keyCode.

      Workaround (if any):
      set button's property focusEnabled="false"

      FlashPlayer: WIN 10,1,85,3 Debug Version

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            adobejira Adobe JIRA

            Dates

              Created:
              Updated:

              Slack

                Issue deployment