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.

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