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 22 forks source link

Some suggestions #78

Closed bottleblue closed 9 years ago

bottleblue commented 10 years ago

This a pretty nice addon. I wanted to suggest some things that might improve it.

The Highlight All, Match Case, Find in All Tabs, and x buttons are all the way on the right while the search box is all the way on the left. That's not a good place to put the buttons. Actually that's the worst place to put them. It should be next to the search box, after the matches counter. Or let us customize the order and where to put them, especially the close button. Some people might prefer the x button on the left, right, middle, after the search box, etc.

Let us close the find bar by double clicking it. This was my preferred method. .

An option to Find All in only the current tab. I know I could just ignore the rest of the tabs in the Find All box but it would look less cluttered if it only showed the search entries.

This one might be a bug. When I open the Find bar it shows the last word I searched for. If I hit enter or click next it does not highlight all the words anymore. I have to manually type something in or click the Highlight All button twice to highlight the words again.

How about some more Sights Styles? Maybe an arrow pointing next to the word? Or a rectangular box around the word?

Quicksaver commented 10 years ago

I'm sorry, I'm sure I replied to this issue at the time, but somehow my answer isn't here.

In short, most of your suggestions I already have planned to add (#48, #60, also the Find All only in the current tab and more sights styles).

About the bug, does it show anything in the error console (Ctrl+Shift+J) in that case? Both when you open the find bar and it assumes the previously searched value, or when you hit enter and it doesn't search or highlight.

bottleblue commented 10 years ago

Yea the site thought this account was a bot so it set my profile to private which removed my post from the public and probably deleted your post. Sorry you had to reply twice.

When I opened the find bar and it shows the last word I get this in error console: [13:57:41.032] ReferenceError: perTabFB is not defined @ chrome://findtocenter/content/functionfindcenter_hack.js:30 [13:57:41.083] GET https://us-mg.mail.yahoo.com/....(removed) [13:57:41.153] perTabFB is not defined @ chrome://findtocenter/content/functionfindcenter_hack.js:30

When I hit enter I get: [14:03:49.791] GET https://us-mg.mail.yahoo.com/...(removed) [14:03:49.991] ReferenceError: perTabFB is not defined @ chrome://findtocenter/content/functionfindcenter_hack.js:30 [14:03:50.649] perTabFB is not defined @ chrome://findtocenter/content/functionfindcenter_hack.js:30 [14:03:52.232] An error occurred executing the cmd_selectNone command: [Exception... "An attempt was made to use an object that is not, or is no longer, usable" code: "11" nsresult: "0x8053000b (InvalidStateError)" location: "chrome://global/content/globalOverlay.js Line: 91"] @ chrome://global/content/globalOverlay.js:95

Hmm I just noticed that this only seems to be happening on yahoo.com. Other sites are working properly. When I open the find bar on this site, it shows the last search word and the words on the page are automatically highlighted. I thought I tested this problem on other sites also. I guess it's just something with yahoo.

Quicksaver commented 10 years ago

It seems this is actually an incompatibility with the Find to Center add-on, which you seem to have installed. If you disable that, can you confirm that if you disable it, the issue disappears?

Also, Firefox finds to center by default, ever since Firefox 12, so that add-on is not needed anymore and you can remove it safely without losing any functionality if it really is the cause of the problem.

bottleblue commented 10 years ago

Yes that seems to have fixed it. I had actually removed Find to Center before reading your post as I found out it wasn't necessary anymore but I didn't think to test the problem again. Thanks for helping and for the addon!

Quicksaver commented 10 years ago

No problem. I'll let you know through here when I release a version with the suggestions you made so you can try them out as well.

bottleblue commented 10 years ago

Awesome thanks!

bottleblue commented 10 years ago

Hey unfortunately the problem I was having with Findbar Tweak not highlighting the words when I re-open the find bar with the last word entered is still happening. Even worse is the url address that popups at the bottom of the screen when I mouseover a link becomes a black bar for some reason. Here's a screenshot: http://i.imgur.com/RYbEde6.jpg

I can sometimes reproduce the problem by opening the find bar, it shows the last word with no highlighting on the page, I click Highlight All button twice to highlight the search word. Then I mouseover a link and it shows me the url address on the bottom. I move my mouse off the link and a black bar remains where the address was. Sometimes I can see the black bar appear for a split second when I close the find bar.

The only thing I get in the Error Console is this:

[02:21:54.646] "[Title Listener] Waiting for title head..."

which is for a youtube greasemonkey script that's on another tab.

Quicksaver commented 10 years ago

I notice two things in your screenshot: the black bar (which is just weird) and the "Update Results" button is visible with the Find in All Tabs lists closed.

Both of these, plus the not highlights bug, seem like some kind of incompatibility. please try disabling all other add-ons, except for FBT, and see if any of these still happen.

bottleblue commented 10 years ago

Ok I've discovered something. The not-highlighting problem only seems to occur when I use a mouse gesture to open the find bar. I have FireGestures addon and it has a command to open the find bar. When I do the mouse gesture that's when I see the problem. If I use Ctrl+F the problem doesn't occur. So I guess there's a problem with FireGestures' built-in command to open the find bar.

Quicksaver commented 10 years ago

(I'm assuming you're using the "Open / Close Find Bar" action that comes built in with FireGestures, and not a custom script).

Yep, I see it. I'll try to fix it so it also highlights when opening the find bar using FireGestures. Any news on the other issues?

bottleblue commented 10 years ago

I have no idea what could be causing the black bar. Try this: assign a gesture for FireGestures' open find bar. Then go to this site (because that's where I've been testing it) http://www.ultimatebootcd.com/
Open the find bar and enter a word that's on the page like "the". Close the find bar. Re-open the find bar using the mouse gesture. The words shouldn't be highlighted. Press Highlight All twice to highlight the words and then close the find bar using the mouse gesture. Do you see the entire find bar become a black bar for a split second and then a url popup appears as a black bar?

Quicksaver commented 10 years ago

Nope, following those steps I don't see any black bar at any time. Have you tried disabling all your other add-ons?

bottleblue commented 10 years ago

I don't know anything about javascript but what if you created a javascript command in FireGestures to use Ctrl+F instead of the built-in find bar command? Or is the built-in command using Ctrl+F?

No I haven't tried disabling all my addons as I have a ton of them and it would be a pain to try and isolate the problem right now. Do you want me to use a new profile and try it? I can disable the addons but not right at this moment.

Quicksaver commented 10 years ago

Testing in a new profile would be good, as it would confirm whether the problem is with an add-on you have enabled or some kind of custom stylesheet you have applied. Of course I completely understand that you don't have the time right now.

A custom command would probably work fine. Ctrl+F is using a "modified built-in" command, which inside of it is, among other things, the "open" command. I'm guessing FireGestures isn't using the actual global "use find bar" command, but rather jumping straight to the open and close commands. I'm sure this is something I can fix locally, but I will also see if it's something that would be more easily fixed by FireGestures itself, as I'm sure you won't be the only one with this issue. When I look into it I'll let you know about it.

bottleblue commented 10 years ago

I tested it in a new profile and the non-highlighting problem with FireGestures is still there, but I couldn't reproduce the black bar problem. I guess another addon is causing the black bars. I can try to isolate which addon is causing it but it'll be tough since I can't consistently recreate the problem.

bottleblue commented 10 years ago

I decided to disable the addons in my normal profile to get to the root of this problem. I started disabling a few at a time and checking it. I disabled more and more but the problem was still happening. Then I disabled all addons except for FT and FireGestures and the problem was still there. Finally I disabled FireGestures and the problem didn't go away.

In fact the problem occurs differently now. When I open the find bar and click Highlight All to de-highlight the words the black bar would appear without mousing over a link. If I moused over a link the black bar disappears and I can see the url address. Once I mouse away the bar returns. If I highlight the words again it disappears. I de-highlight and it appears again. It's weird.

Maybe it's some individual setting in about:config that I changed or it's all the addons that I've installed and uninstalled and some setting is left over. I don't know. I think I'm just gonna give up on the black bar problem. I was going to do a screen recording of the problem to show you but I couldn't get the software to work. It's not that big of a deal though. Usually when I switch tabs the problem goes away for awhile.

Quicksaver commented 10 years ago

Don't worry about the screen recording, you've been doing a lot of debug work already and I do think I understand what you say is happening.

It is probably something leftover like you said, or maybe a customization in your userChrome.css if you (or any add-on) ever made one. Just confirm one thing, when the black bar appears, if you mouse over to it, can you click it or does it go away?

bottleblue commented 10 years ago

I already replaced the profile with a backup that I made before I disabled the addons. I haven't experienced the black bar being "stuck" on the screen yet so I can't remember if the bar went away if I moused over it. The problem I'm currently seeing is when I open/close the find bar the entire bar flickers black for a split second. And sometimes when I close the find bar the mouse gesture "tooltip" that tells me what gesture I performed (which is also the same place where the url tooltip is) turns black as well.

But I have to do a range of things to make it happen. I have to highlight or unhighlight the words. Or click Next a single time or a bunch of times. Then I close the find bar and it usually happens.

bottleblue commented 10 years ago

I also noticed the Quick findbar doesn't have the "Find in All Tabs" button. Do you see a reason why it can't be there? There's plenty of space heh.

bottleblue commented 10 years ago

The problem with the black bar staying on the screen came back. Clicking on it or moving the mouse over it does not make it go away.

Quicksaver commented 10 years ago

The quick find bar hides automatically, so it can't have the Find in All Tabs lists because they require the find bar to be always open. However I am planning some changes to all of this for the next release, that will allow the quick find bar to also have this button.

As for the black bar, I hope you are able to do something.

If all goes well, the DOM Inspector will jump to the node that is the black bar, let me know if it has some kind of id, class or anything else that might identify it. At least this way I'll know what it is at least.

If it's the statuspanel element, which I suspect, can you please select in the right pane the panels "DOM Node" and "CSS Rules" and send me a print screen of both of these?

I'm sorry to once again put you through so much trouble.

bottleblue commented 10 years ago

Oh ok, thanks for explaining about the quick find bar.

It's no trouble at all. Stuff like this happens. I'm kinda curious myself what the problem could be. I'll do all that stuff and let you know what I find.

bottleblue commented 10 years ago

I can't use DOM Inspector on the black bar because as soon as I click or alt+tab to the DOM inspector window the black bar disappears. Is there a way to have Inspector continuously monitor a page in the background?

Quicksaver commented 10 years ago

The problem is it doesn't really monitor anything, it just "finds" in the window structure whatever it is that you click... I need to think about this, to try to come up with a way to figure this out.

Quicksaver commented 10 years ago

Does this happen on a specific set of webpages or in all webpages as long as you use the find bar?

Could you try opening your profile folder (there's a quick access button in About (menu) - Troubleshooting information) and look for a userChrome.css file in ther. It could be some old customization in there doing it.

Open DOM Inspector and try to keep both the main browser window and the DOM Inspector window visible, side by side or something, so you can see immediately the results of what you do. In DOM Inspector load the browser chrome document as before, click the first toolbar button and click somewhere in the webpage. It will navigate to wherever you clicked, so navigate back until the browser element (in bold), and then back once more to its parent stack element.

Just below that stack element should be a statuspanel element. If it isn't, in the browser window mouse over some link to show it in the corner, so the element is created.

Now trigger the black bar and go to the DOM Inspector and select that statuspanel element and give me a print screen of the DOM Node and CSS Rules right panes of that element.

You said the black bar disappears when you switch windows. In the DOM Node right pane, delete the attribute named "inactive" (should have the value "true"). This will make the status panel visible until you mouse over another link, please tell me if that brings the black bar back or just the normal link status panel.

Also, and I don't mean to discourage you, you may have to create a new profile (to actually become your new profile) to get rid of the problem. I would of course love to resolve this in your current profile, but without being able to reproduce it and if none of this helps with anything, I'm not sure what else to do.

bottleblue commented 10 years ago

I think it happens only on specific webpages.

I took out the userchrome.css file and started firefox and the problem was still there.

I don't understand this part, "It will navigate to wherever you clicked, so navigate back until the browser element (in bold), and then back once more to its parent stack element." I clicked somewhere in the webpage and I can see DOM Inspector navigating to where I clicked. But I don't know what the browser element is. I don't see anything in bold. Maybe if you could post a screenshot that would help and use DOM Inspector on this page, on the same paragraph (Open DOM Inspector and try to keep both...)

Quicksaver commented 10 years ago

For example, in this page, open the DOM Inspector, go to "File - Inspect Chrome Document" and select the first entry, which should be the main browser window, with title "Some suggestions - Issue..." (the title of this webpage).

Then click the "Find a node" button in DOM I.'s toolbar and click on the background of this page. It should navigate to something like this: dom1

It doesn't matter exactly where it navigates to, because what you want is to close the parent browser element and find the statuspanel element just below it, like this: dom2

That's the element I think actually is the black bar, which of shouldn't be black at all. If you delete the "inactive" attribute on the right pane, it will make the status panel visible, and if it was black it should still be black.

The "DOM Node" panel above and the "CSS Rules" one: dom3 are the ones I'm interested in.

bottleblue commented 10 years ago

Screenshots of DOM node and CSS rules

1

2

"You said the black bar disappears when you switch windows. In the DOM Node right pane, delete the attribute named "inactive" (should have the value "true"). This will make the status panel visible until you mouse over another link, please tell me if that brings the black bar back or just the normal link status panel."

I can't seem to make the black bar appear without mousing over a link first so deleting the "inactive" attribute won't work as it will just bring back the attribute. I guess the black bar is connected to the url popup somehow.

Misc. screenshot of black bar/url popup remaining after I close findbar 4

Also, I mentioned before how the entire findbar turns black for a split second when closing it. Once the black bar problem happens, if I click the X button on the findbar it will cause the whole findbar to turn black and I can repeat this indefinitely by clicking X and then pressing Ctrl+F (which also makes the findbar turn black for a split second upon opening it). 3

(All addons except Findbar Tweak and DOM Inspector were disabled)

Quicksaver commented 10 years ago

I don't see anything wrong with the statuspanel screenshots (the statuspanel element is the url popup).

How did you get that blue clouds background into the browser? Is it a theme?

bottleblue commented 10 years ago

It's a firefox persona. I've already tried disabling it and the problem still occurs.

Quicksaver commented 10 years ago

Could you let me know if the same still happens with the latest version 1.4.15 I just uploaded (https://addons.mozilla.org/en-US/firefox/addon/findbar-tweak/versions/) ?

I actually haven't done anything specifically for this issue, because I'm still at a loss at what's causing this. But I can tell you that I'm planning to rewrite a lot of the current code for the next release (which will take a while) to implement several new features and improve performance across the board. Hopefully that will also help with your issue. And of course I'll let you know if I upload a version that I think might fix your issue. Sorry to not be able to provide any more help with this

bottleblue commented 10 years ago

Ok I'll try to take a look at it later. I actually don't think I've experienced the problem since commenting on it the last time. I've kinda forgotten about it. But I'll see if it's still there. Thanks for the updated version.

bottleblue commented 10 years ago

I tested it out with the latest version 1.4.17 on that same website (http://www.ultimatebootcd.com) and it still does it. But like I said I haven't experienced it elsewhere that I can remember so it's probably just that site.

Quicksaver commented 9 years ago

If this bug is still affecting you, please try the latest beta version 2b2 (https://addons.mozilla.org/firefox/addon/findbar-tweak/versions/) and see if it still happens there. If it does let me know.

bottleblue commented 9 years ago

I have not encountered this problem again thankfully. You think I should still download it?

Quicksaver commented 9 years ago

If the current version isn't giving you trouble you don't need to, it'll update automatically once I release it. ;)

bottleblue commented 9 years ago

Ok I'll just wait then. Thanks for keeping up on this. I'd totally forgotten about this problem. Nice to know your addon is still being updated :)