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

When the search query changes, regardless of the search command, always re-calculate matches (bug 1030622) #10223

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Nov 5, 2018

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1030622

Edit: When following the STR in https://bugzilla.mozilla.org/show_bug.cgi?id=1030622#c4, the problem occurs at step 6 since the automatic population of the findInput apparently doesn't trigger a find event.
Obviously this could, and maybe even should, be seen as a bug in Firefox itself, however it's easy enough to fix in PDF.js and the patch makes sense in general since PDFFindController.executeCommand becomes less sensitive to user error when called (e.g. in a custom viewer implementation).

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

…ithout a `state` object

Most of the code in `PDFFindController` assumes that a valid `state` always exits, hence it cannot hurt to add a simple check to avoid errors being thrown.
@mozilla mozilla deleted a comment from pdfjsbot Nov 10, 2018
@mozilla mozilla deleted a comment from pdfjsbot Nov 10, 2018
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/57a4175f2a68688/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/57a4175f2a68688/output.txt

Total script time: 3.29 mins

Published

@timvandermeij timvandermeij merged commit 5706961 into mozilla:master Nov 10, 2018
@timvandermeij
Copy link
Contributor

Thank you for improving this!

@Snuffleupagus Snuffleupagus deleted the find-reset-on-query-change branch November 11, 2018 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants