This content has been marked as final. Show 3 replies
I have not actually tried to do this so I may be talking out of my ears. But I imagine it would be possible to extend the text area control so that on a mouse down event it restricts the mouse movement to only the area of the textarea control. Only on a mouse up would it release the mouse to move outside the text area. This way if you are attempting to allow for cut/copy features you do not have to worry about factoring in when the mouse is outside of the text area.
Just a thought. I may be thinking too much "Inside the Box". :D
Thanks for that - could definitely work.
Thinking about this some more - I really need a more general solution. Not only the mouse can be used to change the selection - the keyboard also.
Therefore, I need some event dispatched whenever the text selection changes... Is this possible?
You should add a listener for mouseUp and mouseLeave in capture phase on the stage. That way you'll see mouse up anywhere