Fix text selection regression