Fixes some caret positioning issues in iOS 8.