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)
(event.target as SkinnableTextBase).text = '' "
It will also work with a TextArea.