Fix a weird issue with firefox's text selection on pastes