Browse Source

Ctrl + F opens find bar instead of toggling it

Rob Wu 12 years ago
parent
commit
f013d44999
  1. 9
      web/pdf_find_bar.js
  2. 2
      web/viewer.js

9
web/pdf_find_bar.js

@ -144,11 +144,12 @@ var PDFFindBar = {
}, },
open: function() { open: function() {
if (this.opened) return; if (!this.opened) {
this.opened = true;
this.toggleButton.classList.add('toggled');
this.bar.classList.remove('hidden');
}
this.opened = true;
this.toggleButton.classList.add('toggled');
this.bar.classList.remove('hidden');
this.findField.select(); this.findField.select();
this.findField.focus(); this.findField.focus();
}, },

2
web/viewer.js

@ -1926,7 +1926,7 @@ window.addEventListener('keydown', function keydown(evt) {
switch (evt.keyCode) { switch (evt.keyCode) {
case 70: // f case 70: // f
if (!PDFView.supportsIntegratedFind) { if (!PDFView.supportsIntegratedFind) {
PDFFindBar.toggle(); PDFFindBar.open();
handled = true; handled = true;
} }
break; break;

Loading…
Cancel
Save