Robert Bak – Notes

Some programming tips – updated sometimes

Snippet – Disabling paste on spark TexInput

It’s a common requirement for e-mail or password inputs – the second input should not be copy pasted from the first one, to make sure it’s what the user wanted to put in. When using spark my Flex 3 method didn’t work, so just in case someone needs to do the same thing, here’s the code for spark components:

   change="if (event.operation is PasteOperation)
   ( as SkinnableTextBase).text = '' "


It will also work with a TextArea.

, , , , ,

One thought on “Snippet – Disabling paste on spark TexInput

Leave a Reply

Your email address will not be published. Required fields are marked *