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

Possible to pop the home view when rapidly pressing the hardware back button

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Mobile: ViewNavigator
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Open the attached project (a tablet application that handles hw back button presses by popping the view if the navigator depth is >1)
      2. Run on device (android)
      3. Click through to get the to 4th view
      4. Rapidly press the HW back button

      Actual Results:
      All views get popped, even the home view

      Expected Results:
      Because we do if(navigator.length>1)

      {navigator.popView();}

      , I would expect the home view to not be popped, but in this case it seems like commands are stacking up and being executed before the transistions are complete.

      Workaround (if any):

      With the fix in 4y 23090, the proper way to handle back keys is as so:
      private function deviceKeyDownHandler(event:KeyboardEvent):void
      {
      var key:uint = event.keyCode;

      if (key == Keyboard.BACK)

      { event.preventDefault(); if (navigator.length > 1) navigator.backKeyUpHandler(); }

      }

      protected function addedToStageHandler(event:Event):void
      {
      stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
      }

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: