[
https://issues.apache.org/jira/browse/FLEX-34344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Chira updated FLEX-34344:
-------------------------------
Description:
*Steps to reproduce [DropDownList]*:
1. Import and run the project called "_DropDownListListeningTooMuch.fxp".
2. Click on the dropdown and select an item.
3. Right click on the dropdown, which removes it from stage.
4. Press UP/DOWN.
*Actual behaviour*: the dropdown's _proposedSelectedIndex keeps changing,
showing the dropdown is still acting on keyboard events.
*Desired behaviour*: once it's off stage, the dropdown should not react to
keyboard - or any other - events.
*Notes*:
-the same behaviour can be made visible by placing a breakpoint in
DropDownListBase.keyDownHandler after step 3.
-the dropdown stops reacting to keyboard events when it's removed directly, as
opposed to when its parent group is removed.
-I noticed that UIComponent adds event listeners for KEY_DOWN, KEY_UP, FOCUS_IN
and FOCUS_OUT, but never removes them. Is the expectation that components
themselves will remove these listeners when they're off stage, or is it an
omission?
-It feels like this issue has memory management implications, though I'm not
too sure.
----
*Steps to reproduce [NumericStepper]*:
1. Import and run the project called "_NumericStepperListListeningTooMuch.fxp".
2. Click on the numeric stepper.
3. Right click on the numeric stepper, which removes it from stage.
4. Press UP/DOWN.
*Actual behaviour*: the numeric stepper's value keeps changing, showing it's
still acting on keyboard events.
*Desired behaviour*: once it's off stage, the numeric stepper should not react
to keyboard - or any other - events.
----
*Steps to reproduce [TextInput]*:
1. Import and run the project called "_TextInputListeningTooMuch.fxp".
2. Type something in the text input.
3. Right click on the text input, which removes it from stage.
4. Continue typing.
*Actual behaviour*: the the text input's contents keep changing, showing it's
still acting on keyboard events.
*Desired behaviour*: once it's off stage, the text input should not react to
keyboard - or any other - events.
was:
*Steps to reproduce [DropDownList]*:
1. Import and run the project called "_DropDownListListeningTooMuch.fxp".
2. Click on the dropdown and select an item.
3. Right click on the dropdown, which removes it from stage.
4. Press UP/DOWN.
*Actual behaviour*: the dropdown's _proposedSelectedIndex keeps changing,
showing the dropdown is still acting on keyboard events.
*Desired behaviour*: once it's off stage, the dropdown should not react to
keyboard - or any other - events.
*Notes*:
-the same behaviour can be made visible by placing a breakpoint in
DropDownListBase.keyDownHandler after step 3.
-the dropdown stops reacting to keyboard events when it's removed directly, as
opposed to when its parent group is removed.
-I noticed that UIComponent adds event listeners for KEY_DOWN, KEY_UP, FOCUS_IN
and FOCUS_OUT, but never removes them. Is the expectation that components
themselves will remove these listeners when they're off stage, or is it an
omission?
----
*Steps to reproduce [NumericStepper]*:
1. Import and run the project called "_NumericStepperListListeningTooMuch.fxp".
2. Click on the numeric stepper.
3. Right click on the numeric stepper, which removes it from stage.
4. Press UP/DOWN.
*Actual behaviour*: the numeric stepper's value keeps changing, showing it's
still acting on keyboard events.
*Desired behaviour*: once it's off stage, the numeric stepper should not react
to keyboard - or any other - events.
----
*Steps to reproduce [TextInput]*:
1. Import and run the project called "_TextInputListeningTooMuch.fxp".
2. Type something in the text input.
3. Right click on the text input, which removes it from stage.
4. Continue typing.
*Actual behaviour*: the the text input's contents keep changing, showing it's
still acting on keyboard events.
*Desired behaviour*: once it's off stage, the text input should not react to
keyboard - or any other - events.
> Many components (e.g. TextInput, DropDownList, NumericStepper) keep acting on
> keyDown and other events after being removed from stage
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FLEX-34344
> URL: https://issues.apache.org/jira/browse/FLEX-34344
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: DropDownList
> Affects Versions: Apache Flex 4.12.0
> Reporter: Mihai Chira
> Labels: easytest
> Fix For: Apache Flex 4.13.0
>
> Attachments: _DropDownListListeningTooMuch.fxp,
> _NumericStepperListListeningTooMuch.fxp, _TextInputListeningTooMuch.fxp
>
>
> *Steps to reproduce [DropDownList]*:
> 1. Import and run the project called "_DropDownListListeningTooMuch.fxp".
> 2. Click on the dropdown and select an item.
> 3. Right click on the dropdown, which removes it from stage.
> 4. Press UP/DOWN.
> *Actual behaviour*: the dropdown's _proposedSelectedIndex keeps changing,
> showing the dropdown is still acting on keyboard events.
> *Desired behaviour*: once it's off stage, the dropdown should not react to
> keyboard - or any other - events.
> *Notes*:
> -the same behaviour can be made visible by placing a breakpoint in
> DropDownListBase.keyDownHandler after step 3.
> -the dropdown stops reacting to keyboard events when it's removed directly,
> as opposed to when its parent group is removed.
> -I noticed that UIComponent adds event listeners for KEY_DOWN, KEY_UP,
> FOCUS_IN and FOCUS_OUT, but never removes them. Is the expectation that
> components themselves will remove these listeners when they're off stage, or
> is it an omission?
> -It feels like this issue has memory management implications, though I'm not
> too sure.
> ----
> *Steps to reproduce [NumericStepper]*:
> 1. Import and run the project called
> "_NumericStepperListListeningTooMuch.fxp".
> 2. Click on the numeric stepper.
> 3. Right click on the numeric stepper, which removes it from stage.
> 4. Press UP/DOWN.
> *Actual behaviour*: the numeric stepper's value keeps changing, showing it's
> still acting on keyboard events.
> *Desired behaviour*: once it's off stage, the numeric stepper should not
> react to keyboard - or any other - events.
> ----
> *Steps to reproduce [TextInput]*:
> 1. Import and run the project called "_TextInputListeningTooMuch.fxp".
> 2. Type something in the text input.
> 3. Right click on the text input, which removes it from stage.
> 4. Continue typing.
> *Actual behaviour*: the the text input's contents keep changing, showing it's
> still acting on keyboard events.
> *Desired behaviour*: once it's off stage, the text input should not react to
> keyboard - or any other - events.
--
This message was sent by Atlassian JIRA
(v6.2#6252)