-
Notifications
You must be signed in to change notification settings - Fork 98
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
Firefox hangs when searching with / and a text input field is open, only when there's a match #206
Comments
Okay, I was able to pinpoint the issue. It's an infinite loop in I got to this by placing a breakpoint before and after the loop (after trying other spots at I am testing it on a more recent version of Firefox than I previously reported:
Can any devs take a look at this? |
Any news here, if this can be fixed? |
One simple way to work around this is to hide the input elements while the highlighting is done and restore them. I tested it (manually) and it works. (Obviously, the matches in the input fields are left out.) If you restore the fields immediately after the highlighting, you do lose the wraparound behaviour of n/N however: to get back to the top match from the bottom, you have to reverse direction or repeat the search. If you leave the fields hidden, n/N wil work normally. Note: once the fields are unhidden and the highlighting is cancelled, pressing n/N will freeze the browser, since it repeats the search highlighting with the input fields visible. (If you wanted, you could prevent this issue by never actually cancelling the search highlighting, but instead hiding it temporarily using a style.) If you want to test it, you can use these commands from my .pentadactylrc:
I tried rebinding /, n and N to hide the input fields first, and using C-/ to clear the highlighting and unhide the input fields.
but it seemed a bit unreliable, so I've settled on just rebinding / and leaving the input fields hidden. If I need them again after searching, I have a binding specifically to restore them:
This can be implemented in a .pentadactylrc file. A better workaround would be to hack the source so the highlight function simply ignores matches in input fields. I haven't tried that yet, but it sounds simple enough. |
See issues: * 5digits/dactyl#206 (comment) * madand/pentadactyl-pm#2 The `RangeFinder.highlight()` function from `finder.jsm` gets stuck in an infinite loop when the search term matches input field text. Rebind `/` and `?` to first hide all input fields, then search. In case the input fields are required again, `<C-?>` unhides them.
As this issue is annoying I'm going to test your workaround. However I would appreciate a bugfix in the sources. |
This seems to work sometimes, but now always. How to reproduce:
..freezing. |
This is still unstable, last freeze on https://forums.gentoo.org, writing a comment, preview, search by /, freeze. Which is most annoying as all the comment is lost... |
Whenever I search with
/
and I have a page open which contains a text input field and there is a match, Firefox hangs. This did not happen on previous versions of Firefox, and doesn't happen without Pentadactyl (i.e. when searching with Ctrl+F). I'm using Mozilla Firefox 45.8.0 from Gentoo and Pentadactyl hg7290. I'm not sure how to provide more debug info since Firefox completely hangs when this happens. I provide the last 50 lines of an strace below. My session consisted of opening this page, writing "if" in the text field, and then searching for "if" with/
. Firefox then hangs and I send SIGTERM to it. If the entire strace would be useful I can provide it (are there no privacy issues in doing so?).The text was updated successfully, but these errors were encountered: