Find API - highlightResults not working in FF71+

Hi,
I am the developer of HighlightAll extension for Firefox.
In order to highlight text in web pages, I make use of the find API.
After calling find.find() to find occurrences, I then use find.highlightResults() to highlight them. It used to work well. But it seems that since the release of FF71 this function does not work anymore.
An error is thrown: “no search results to highlight”

My code looks like below:

browser.find.find("word").then(
    function(results){
        console.log(results); // does log a valid object with "count" property as expected
        if (results.count > 0) {                
            browser.find.highlightResults(); // throws error
        }
    }
);

Is it possible that something is broken in the Firefox API ?

I would really appreciate some feedback about this.
Thanks,
Jerome

I don’t notice any updates here regarding any intentional changes:

This bug related to find in out-of-process iframes modified the extension find code in Firefox 71:

https://hg.mozilla.org/releases/mozilla-release/rev/3977d67dc67ae062a7a4982153339fccac4a50a8

Possibly it has caused a regression?

1 Like