Closed
Bug 62467
Opened 24 years ago
Closed 14 years ago
Highlight all "find" results in page
Categories
(SeaMonkey :: Search, enhancement, P3)
SeaMonkey
Search
Tracking
(Not tracked)
Future
People
(Reporter: paul, Unassigned)
References
Details
Attachments
(5 files)
I'd like to have the ability to highlight words entered in the search bar in the
webpage. I've knocked up some crufty code to do this and will attach it in a
minute. It's not complete, but I'd like to get the idea on the radar because
there are a few other bugs on the radar about redesigning the search sidepanel.
I'd like this addition (or a varient of it) to be included within any redesign.
These are bug 40704 bug 44816 and bug 44724 (which seem somewhat dupey)
In my implementation you basically type in some search words in the search
sidebar and click on highlight.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Updated•24 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•24 years ago
|
||
Following a helpful chat with glazou and others on #mozilla it is clear that
doing this properly is somewhat more complex than I initially thought.
For example when using the word 'foo':
<X>F</X>oo
should be highlighted where X is any inline element.
Even further for something like:
<B>F</B><I>oo bar</I>
I'd have to generate something like
<B><SPAN style="...">F</SPAN></B><I><SPAN style="...">oo</SPAN> bar</I>
It seems that what I have done so far is nothing but a cheap hack and there is a
serious amount of going back to the drawing board to be done, but after having a
couple of bad ideas, I think I'm onto a good one......
Comment 5•24 years ago
|
||
Netscape nav triage team: as per Matt Fisher's pre-triage recommendation, this
bug is nsbeta1-.
Keywords: nsbeta1-
Comment 6•24 years ago
|
||
Just a random thought, but perhaps this was already dealt with to some extent in
the code that handles a selection in the content window, like for cut/copy?
Reporter | ||
Comment 7•24 years ago
|
||
My thought was that this might relate in many ways to whatever Search->'Search
in page' does. I hope to find the time to see what that does over xmas.
Marking nsbeta1- bugs as future to get off the radar
Target Milestone: --- → Future
Oye, its been a year since any real indication of work on this bug.
I was going to file a new bug that was similar to this, but figured it would
probably be marked a dupe of this.
Its slightly different in its GUI approach though, allowing for multiple words
to be highlighted (like google does for it's cached pages). See
http://www.google.com/search?q=cache:RdND2rcfmnM:www.mozilla.org/+mozilla&hl=en
for an example if you don't know what I'm talking about.
I'll attached a few mock screen shots to illustrate my proposal. The guys over
at googlebar.mozdev.org might be interested in this, or they might have already
started working on a similar feature, so that should be looked into as well.
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
Comment 12•23 years ago
|
||
As someone who works on the googlebar, I know that our find in page feature has
some really annoying bugs in it- it can only highlight one instance of one
search term at a time on the page, and the buttons only appear once the search
has been run (and don't start me on what it takes to make the buttons disappear-
it's not pretty). Was this just a mockup screenshot you'd prepared, or do you
have any code you might suggest? We'd be very interested if you do have a better
way. What would be involved in multiple keywords with mult colors?
Comment 13•23 years ago
|
||
As I indicated above, those were merely mock screenshots. I don't know how to
code really. These were just mock screen shots (using google's cache feature) I
made intending to spur on visualization and development of this feature.
Comment 14•23 years ago
|
||
Shame they were mockups and not code behind it... while I have some coding
ability that I'm working on extending, I don't have anything on the order of
what I'd need to implement this feature and the project person who does is
focusing attention on another project. Therefore I'll put out the question to
anyone who reads this- what would be involved it highlighting multiple terms
found in the page? Ie code, ideas of what types of styles to invoke- the url is
http://googlebar.mozdev.org/annotation.html if you'd like to make a suggestion.
We'd appreciate it.
Comment 15•23 years ago
|
||
I fixed Paul's code to work with non-trivial regexps and turned it into a pair
of bookmarklets:
http://www.squarefree.com/bookmarklets/pagedata.html#highlight
http://www.squarefree.com/bookmarklets/pagedata.html#highlight_regexp
Theoretically it should be possible to use the browser's built-in find feature
and use Range.surroundContents to mark off matches that span element
boundaries. Unfortunately, surroundContents doesn't work half the time and
crashes the other half of the time (bug 58974). Also, it would be nice if I
could find ranges instead of having to convert selections created by find()
into ranges (bug 123087).
Comment 17•23 years ago
|
||
*** Bug 124311 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Summary: [rfe] Enable highlighting of searched words in webpage → [rfe] Highlight "find" results in page
Summary: [rfe] Highlight "find" results in page → Highlight "find" results in page
Updated•22 years ago
|
QA Contact: claudius → sairuh
Comment 18•21 years ago
|
||
Is this bug now also dependant on bug 135928?
Updated•21 years ago
|
Summary: Highlight "find" results in page → Highlight all "find" results in page
Comment 19•21 years ago
|
||
See also bug 157788, same bug for Find As You Type.
Comment 20•21 years ago
|
||
Googlebar (http://googlebar.mozdev.org/) does the requested functionality just
fine. Can that code be checked in?
Comment 21•19 years ago
|
||
This bug is (albeit remotely) related to my bug 324898 regarding bugzilla search results.
Comment 22•18 years ago
|
||
Isn't this what "highlight all" does in FF v1.5?
Assignee: samir_bugzilla → search
QA Contact: bugzilla
Updated•16 years ago
|
Product: Core → SeaMonkey
Comment 24•14 years ago
|
||
Bug 97023 fixed this one, marking duplicate.
Bug 157788 is about incremental search. This now opens a bar, too, but that one disappears automatically (I guess using the same timeout that disables FAYT after some time of inactivity) and doesn't provide the "Highlight all" option (or any other, actually). I'd probably go for WONTFIX, but it's not my decision.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•