Editable text disappears during iOS 27 grammar checking

I’m seeing in issue on iOS 27 with TextKit 1 backed UITextViews where grammar checking makes part of the text disappear.

For TextKit 2 views, there's a blue underline and a shimmer effect that's applied to the text when a grammatical error is detected. For TextKit 1 views the underline appears but instead of the shimmer effect, the text just disappears.

Steps to reproduce:

  1. Create a UITextView using TextKit 1: UITextView(usingTextLayoutManager: false)
  2. Fill it with a very long document (makes the bug easier to reproduce).
  3. Type a phrase that triggers a grammar correction, such as “self aware”.
  4. Wait for the system to suggest “self-aware”. The blue underline appears but the two words disappear.

I've found a partial workaround by overriding NSLayoutManager.drawGlyphsForGlyphRange and calling CGContextSetFillColorWithColor on the affected range, but this isn't great.

Filed as FB24319258.

Has anyone else encountered this on the iOS 27 betas? Would appreciate any guidance.

Editable text disappears during iOS 27 grammar checking
 
 
Q