Skip to content

Commit

Permalink
Don't change view position when toggling Highlight All button
Browse files Browse the repository at this point in the history
Fixes #5561.
  • Loading branch information
Quicksaver committed Dec 14, 2015
1 parent e1e2a6a commit 5f9b2cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions web/pdf_find_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
this.dirtyMatch = true;
}
this.state = e.detail;
this.state.type = e.type;
this.updateUIState(FindStates.FIND_PENDING);

this.firstPagePromise.then(function() {
Expand Down Expand Up @@ -273,8 +274,10 @@ var PDFFindController = (function PDFFindControllerClosure() {
return;
}

// We're specifically looking for a match, make sure it's visible later.
this.showCurrentMatch = true;
if(this.state.type !== 'findhighlightallchange') {
// We're specifically looking for a match, make sure it's visible later.
this.showCurrentMatch = true;
}

var offset = this.offset;
// Keep track of how many pages we should maximally iterate through.
Expand Down

0 comments on commit 5f9b2cd

Please sign in to comment.