Skip to main content
Inspiring
May 24, 2010
Answered

SelectionEvent bug?

  • May 24, 2010
  • 1 reply
  • 598 views

Hi,

I'd like to know if somebody else is having this behaivor.

I'm adding an event listerner to SelectionEvent.SELECTION_CHANGE events. in this way:

textFlow.addEventListener(SelectionEvent.SELECTION_CHANGE, selectionChangeListener, false, 0, true );

The proble is that every time the selection changes, the vent is been dispatched twice. The event listener is been added just once.

I also checked the type of the event, just to make sure I'm not capturing two event with the same event listener, but both are of type "selectionChange".

Any ideas?

This topic has been closed for replies.
Correct answer rdermer

Fix is to remove the redundant call to selectionChanged in SelectionManager.handleMouseEventForSelection.

You could subclass SelectionManager and EditManager and then add overrides for mouseDownHandler and mouseMoveHandler so that they call a modified version of the function.

Richard

1 reply

Adobe Employee
May 24, 2010

It's a bug.  Appears to happen on mouse events but not on keyboard events.

I'll write it up.

Richard

oscar7878Author
Inspiring
May 25, 2010

Any idea on how to stop it or a workarround? this is making my app to run some processes twice.

rdermerCorrect answer
Adobe Employee
May 25, 2010

Fix is to remove the redundant call to selectionChanged in SelectionManager.handleMouseEventForSelection.

You could subclass SelectionManager and EditManager and then add overrides for mouseDownHandler and mouseMoveHandler so that they call a modified version of the function.

Richard