Quicksaver / FindBar-Tweak

A firefox add-on that lets you customize the Find Toolbar the way you like it.
https://addons.mozilla.org/firefox/addon/findbar-tweak/
Mozilla Public License 2.0
91 stars 21 forks source link

Search doesn't work on PDFs viewed via PDF.js #296

Open blackwind opened 7 years ago

blackwind commented 7 years ago

Starting with Firefox 53 (I think), and definitely as of Firefox 54, PDFs have become unsearchable when viewed via Mozilla's PDF reader, PDF.js. Disabling FBT resolves the issue, but obviously, that's not the resolution I'm looking for.

I completely understand why you've ceased development, Luis, but it's crystal clear at this point the vast majority of add-ons, mine included, won't be ported to WebExtensions. If Mozilla goes forward with their plans for Firefox 57 -- and I'm still not convinced they will if the add-ons aren't there -- Pale Moon or Waterfox will fill the vacuum. I, for one, will be using FBT and PT long, LONG past Firefox 57, and I suspect I'm not alone, so I hope you'll reconsider your stance -- hold off on new features and new add-ons until the dust settles, sure, but support your loyal users in the interim.

DanHarkless commented 7 years ago

Yes, this is a real bummer, since searching for strings in big PDFs is something I do all the time. I've had to disable PDF.js with pdfjs.disabled = true in about:config to work around this. Of course Adobe Reader is faster and somewhat more capable than PDF.js, but it's also less secure. And it hurts productivity to not to be able to have a PDF document open in a tab in Firefox amongst a group of related HTML (and/or other PDF) tabs. Pity that Adobe Reader's browser plugin is no longer supported.

I could disable FindBar Tweak, since most of its features are just nice-to-haves for me, but I rely on its "Find in All Tabs" feature to simply get a list of all tab titles. When researching stuff (and/or when putting off to-dos because I need to work on higher-priority stuff first), I often end up with very large browser sessions with dozens of windows, most of them with more than one tab, and some with dozens of tabs. To my amazement, I haven't found any way to get a list of all tab titles in all windows aside from the unsortable list that you can get from Find in All Tabs. Can anyone recommend another way to do that?

I'm another Firefox user that will be using Pale Moon or another fork after Firefox ESR drops support for XPCOM/XUL extensions (which are the main reason I've remained a Mosaic/Netscape/Mozilla/Firefox user since the dawn of the Web). As for Pale Moon, the current version doesn't have PDF.js, so this issue doesn't arise there. Also, it uses a fork of FindBar Tweak made by the Pale Moon Add-ons Team called FinderBar Tweak, so this incompatibility could potentially be fixed there if they add PDF.js when re-forking Pale Moon off of a more recent Firefox codebase in the future. However, them fixing it seems relatively unlikely; they currently disable FinderBar Tweak by default in Pale Moon 27+ because it "may cause the browser to crash in some [unspecified] situations".

vertigo220 commented 6 years ago

One possible solution, at least short-term, would be to have FindBar Tweak disable itself for PDFs.

As for Pale Moon, I've been using it the past several years, and I've recently switched to Waterfox. I tried FinderBar Tweak, but I found it to be too buggy, so I wouldn't count on it as an option at all, much less for it to be made to work with PDF.js if the need arises.

grahamperrin commented 6 years ago

+1

I'd be happy with a non-tweaked bar wherever PDF is present.

However with capabilities such as extensions.findbartweak.globalFBUse a single global Findbar for all tabs – I have a hunch that (even without enabling a global feature) it'll not be possible to 'suppress' the tweak at some pages but not others.

Waterfox 56.2.0.31 – on FreeBSD-CURRENT, so an Adobe plug-in is not applicable.


Re: https://github.com/Quicksaver/FindBar-Tweak/commit/0d2bb56f7cad6c1b019dfaf3aa74dec90754e392#comments I wonder whether a developer can find inspiration from the previous commit for an issue of this nature.

grahamperrin commented 5 years ago

I just realised, it might be only partially broken.

https://www.bsuh.nhs.uk/documents/values-behaviours-blueprint/ for example, in my 'everyday' profile with umpteen extensions, when I seek the word bedrock there's highlighting of the first match, and automated scrolling:

2018-10-18 21 27 36 values-behaviours-blueprint pdf

– that might be partially thanks to another extension.

When I view the same PDF in a clean profile with FindBar Tweak alone, find-as-you-type does not result in the highlight or auto-scroll, however with Find all in the sidebar I can at least jump to matching pages:

2018-10-18 21 42 22 values-behaviours-blueprint pdf - waterfox

Incidentally, version 2.1.13 is in a fork; https://redd.it/9p19se for details.

grahamperrin commented 5 years ago

@Ulf3000 (or anyone): might the CSP-related observation at https://github.com/Quicksaver/FindBar-Tweak/issues/292#issuecomment-431554584 help to understand any part of what's wrong around PDF.js?

Ulf3000 commented 5 years ago

@Ulf3000 (or anyone): might the CSP-related observation at #292 (comment) help to understand any part of what's wrong around PDF.js?

i already have "search" and "jump to next entry" already working with a quick hack, but im not happy with that .. problem is that the developer copied/cloned alot of code into his addon which doesnt exist in the newer version of pdfjs(the one shipped with waterfox) so theres all kinds of wrong object names.

mzso commented 4 years ago

Did anyone figure out if there is an offending feature that might be disabled for findbar tweak to not break searching in pdf files?