SwiftUI, macOS, PDFView, The "Remove Highlight" context menu does not work

I'm using PDFKitView: NSViewRepresentable to present the pdf page in SwiftUI. Seems we already have some useful built-in functions in the context menu. However, the highlight manipulation functions are not functional - I can neither delete the highlight annotation nor change the color/type of the current pointed highlight annotation.

The "Add Note" and other page display changing functions work well.

So glad I found this post. I was about to smash my Mac with a baseball bat.

July 2026. Remove highlight and change color does not work on PDFKit view wrapped in NSViewRepresentable.

Hello @jamalK,

Can you share a minimal sample project that reproduces the issue? I'm curious about the specifics – are you able to get Remove Highlight to work outside of an NSViewRepresentable?

Attach this project in a bug report filed through Feedback Assistant, these reports are shared directly with the relevant engineering team. Include steps to reproduce the issue and the affected platform versions.

Once complete reply with the Feedback number, and I'll make sure it is routed to that team correctly.

Thank you,

 Travis

SwiftUI, macOS, PDFView, The "Remove Highlight" context menu does not work
 
 
Q