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.

Dear nttw,

Thanks for reporting this issue. It's one that engineering is aware of and working on. You can track progress on it with your Feedback Assistant bug report.

Cordially,

Richard Yeh  Developer Technical Support

@nttw: Just curious, does the issue happen to TextKit 2? Also, is there anything preventing you from adopting TextKit 2? Thanks.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Hi! We haven't be able to reproduce this on TextKit 2, though anecdotally on the latest beta I noticed a similar bug in the Mail app composer screen where typing inside a grammar suggestion during the "shimmer" caused the text to temporarily disappear.

Would love to adopt TextKit 2 but can't because of FB15241823. Basically if you have a long document, tapping a location in the document to start editing moves the caret to a random location, often thousands of words before the actual user-selected range. We adopted TextKit 2 and got so many user complaints that we had to revert.

Let me know if I can provide any more info.

@DTS Engineer @DTS Engineer

Editable text disappears during iOS 27 grammar checking
 
 
Q