fix #903 Fixing paste on selectbox. Closes #904

Fixing paste action with a valid text when the allowInvalidText is set to false.