Word Count bug when footnotes are present in selected text

When selecting text on at least certain web pages that contain footnotes, the word count only tallies up to the first footnote number within its text. So if that’s the 300th out of 4000 words, PopClip tells me that there are 300 words selected instead of 4000.

An example of this is at An Epistolary Critic | Wyatt Mason | The New York Review of Books .

Select text there that contains a footnote number and beyond and, if your computer is like mine, you’ll see what I mean.

Mac Mini M4, OS 15.7.1.

I should point out that clicking or hovering over the footnote number will pop up the corresponding note in a column to the right of the body of the main text. It’s possible that there are other contexts in which this failure would not occur. I’m not sure.

Hi @maigre33 . Does this happen in a particular browser? Or is there more detail of how to get the issue to occur? I did a quick test in both Safari and Chrome and found that the word count seemed to count normally across the footnote boundary.

Example with Safari:

CleanShot 2025-11-05 at 11.28.11

Oops. I should have tested this in other browsers. It’s working fine in Brave and Safari. The problematic browser is Firefox and at least two other Gecko browsers I just tried, Zen and Mullvad. The latter two, I rarely use and don’t have added extensions other than uBlock Origin. If I disable that extension and reload, the problem I reported still occurs. So it seems to be Gecko related.

Ahy, yes I can reproduce it in Firefox. It seems that Firefox does not report the full selected text attribute to the accessibility API when the seleciton is “broken” by the footnote marker.

However we can put PopClip in a different mode with a Terminal command as follows:

defaults write com.pilotmoon.popclip DeepCapture -bool YES

This will bring the correct word count.

Side effect is that selection captures are now done using the pasteboard by simulated press of ⌘C whenever you select text. This avoids the Accessibility API incorrect text issue. It should be fine but you might notice PopClip appears slightly more slowly, may be issues with clipboard managers, and possible a flashing edit menu when you select text.

Thanks for looking into this. If I use the command line to make the change and I want to revert to default, would I just issue the same command with a NO argument instead of YES?

Given how often I use PopClip in general, I may be better off to leave it at default and do the word count in these cases in non-Gecko browsers.

That’s exactly right – swap YES for NO to put it back to default.