Open GoogleCodeExporter opened 9 years ago
I added the following code to PromptingTextInput:
private var _dispatchAllowed:Boolean = true;
override public function dispatchEvent(event:Event) : Boolean
{
if ( _dispatchAllowed )
return super.dispatchEvent( event );
else
return false;
}
and then modified the focusIn call like this:
protected function handleFocusIn( event:FocusEvent ):void
{
_currentlyFocused = true;
_dispatchAllowed = false;
// If the text is empty, clear the prompt
if ( _textEmpty )
{
super.htmlText = "";
// KLUDGE: Have to validate now to avoid a bug where the format
// gets "stuck" even though the text gets cleared.
validateNow();
}
_dispatchAllowed = true;
}
This took care of it. What are the chances of getting something like this into
a release?
Original comment by nicho...@adobe.com
on 22 Jan 2009 at 4:46
Indeed, the flex validators can be a big pain.
I have a ValidationManager class in the pipe that could take care of the issue
(Validates on change instead of
value commit).
Original comment by olarivain@gmail.com
on 29 Mar 2010 at 1:23
Original issue reported on code.google.com by
nicho...@adobe.com
on 22 Jan 2009 at 4:27