"Highlight" editing action doing nothing in the PDF Navigator

Open
#365 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ios, swift
Domain
mobile-dev

Research direction

Start by reading the PDFDocumentView handling of PDFView’s text-selection menu and the canPerformAction() and buildMenu() overrides mentioned in the issue. Check whether the Highlight action can be identified or suppressed through the existing integration. Done means the iOS 16 Highlight action no longer appears or does nothing when selecting text in the PDF Navigator.

Written by the indexing model from the issue text.

Description

help wanted

Since iOS 16, Apple's PDFView adds a Highlight editing action in the text selection menu, which apparently does nothing.
Unfortunately I could not find a way to disable it, after trying:

  • Overriding canPerformAction() to return false.
    • I did it in PDFDocumentView but also used method swizzling to do it in all the subviews of PDFView, every time layoutSubviews() is called.
  • Overriding buildMenu(), but couldn't find a menu item identifier matching Highlight, I tried all of them.

Other people are having the same issue: https://developer.apple.com/forums/thread/725339

Dominant language
Swift
Stars
557
Forks
249
Avg merge
3h 52m
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from readium/swift-toolkit

All issues in readium/swift-toolkit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.