Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching in PDF stopped working in FF48 #265

Closed
DrZruda opened this issue Aug 4, 2016 · 9 comments
Closed

Searching in PDF stopped working in FF48 #265

DrZruda opened this issue Aug 4, 2016 · 9 comments

Comments

@DrZruda
Copy link

DrZruda commented Aug 4, 2016

It works on regular websites, but when searching in the internal PDF viewer, no matches are displayed, although they do show up after clicking 'Find All'. Once FBT is disabled, the internal search works as expected.

@Quicksaver
Copy link
Owner

It's possible they changed something in Firefox 48 that I haven't added compatibility for yet, I definitely have to check this out.

@Erlotinib
Copy link

Erlotinib commented Aug 9, 2016

Hello,

I've got the same issue with FF48 and FF50 (dev edition).
When I open the search bar on a pdf I got the message (it repeats each time I press on an arrow to search for the next occurence) :

TypeError: this.unWrap.FindStates is undefined PDFJS.jsm:56:3

which point to this part of the code :

receiver: function(data) {
        if(!this.findController) { return; }

        // this is needed so objects created in a privileged scope (the message data) can be used in unpriviliged scope (webpage/pdf reader)
        var fakeEvent = Cu.cloneInto(data, content);

        // We can't pass fakeEvent below and let the native method handle it because of a lot of limitations with its binds and stuff,
        // especially because we also replace PDFJS.findController.nextMatch. So we have to reproduce the whole thing here.
        // This turns out to be good because we can also apply our delay settings here as well.

        if(this.findController.state === null || fakeEvent.type !== 'findagain') {
            this.findController.dirtyMatch = true;
        }
        this.findController.state = fakeEvent;
==>     this.findController.updateUIState(this.unWrap.FindStates.FIND_PENDING);

        Timers.cancel('PDFFindTimeout');

        this.findController.firstPagePromise.then(() => {
            this.findController.extractText();

            if(this.findController.state.type === 'find') {
                Timers.init('PDFFindTimeout', () => {
                    this.findController.nextMatch(this.findController.state.type);
                }, this.findController.state.delay);
            } else {
                this.findController.nextMatch(this.findController.state.type);
            }
        });
    },


Thanks for your addon
regards

@EstelaParada
Copy link

EstelaParada commented Oct 20, 2016

I've got the same issue with FF49.

@eliedrian
Copy link

On FF49, same issue. No feedback is received at all.

@gitterliu
Copy link

gitterliu commented Nov 21, 2016

Firefox 49.02 too. The pdf reader's search bar doesn't search when I type.

@Quicksaver
Copy link
Owner

All issues should be fixed in beta version 2.1.11b1. Please give it a try and let me know if you still have any problems.

@Quicksaver
Copy link
Owner

Also, I'm sorry it took me so long to get to this.

@voxadam
Copy link

voxadam commented Dec 12, 2016

I can confirm that 2.1.11b1 works beautifully in nightly, 53.0a1 (2016-12-11) (64-bit).

Thanks for all you hard work on this excellent extension. Personally, I believe much of this extension's functionality should be integrated directly into Firefox.

@bnbaz
Copy link

bnbaz commented Dec 12, 2016

Also works in Fx 50.0.2 x64 on Win10 using 2.1.11b1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants