Searching for a text string

In Apple Introduces Digital ID, but It Doesn’t Replace Your Passport , @ace mentions a My Number Card. In reply Apple Introduces Digital ID, but It Doesn’t Replace Your Passport - #16 by doug2 , @doug2 also mentions My Number Card. If I search (in Firefox 145.0 under macOS 15.7.2) for “my number”, I can find either @ace’s mention or @doug2’s mentions, but not both. I can switch between which instances I can find by clicking on the page appropriately. Does the forum software somehow treat the quoted article as a separate page or pane from the comments?

When I search for “digital”, initially Firefox only reports the number of instances in the article, and it will move through them as I click the “next” arrow. But when I click the next arrow while on the last instance of “digital” in the article, Firefox will select the first instance in the comments and adjust the total number of instances.

What is happening?

I think the answer is that Discourse loads only a subset of posts in a topic to start. As you scroll, it loads more of them. As a result, when you open a topic to start a search, only the visible text will be searched. If you scroll to the bottom, all the text in the topic will be loaded, such that matches for text that wasn’t originally loaded will work.

2 Likes

Additionally, if you’re scrolling through a long thread, the Discourse scripts will discard content that has scrolled off the top (or bottom) of the page. This can easily confuse a browser’s built-in search features.

Using the Discourse search button (the magnifying glass icon in the upper-right corner) is better than your browser’s search function, because it will search the entire thread.

For the OP’s example:

Click on that. Then type “my number” in the search box and select the “in this topic” option on the menu:

You will be presented with a list of the comments that match. Click on one to go there:

4 Likes