Closed Bug 456960 Opened 16 years ago Closed 15 years ago

"Find" not working properly in pretty-printed XML

Categories

(Toolkit :: Find Toolbar, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 263049

People

(Reporter: wolfpil, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17

This is an essential one.

Reproducible: Always

Steps to Reproduce:
Go to

http://www.tourabout.com/TouraboutRegionSearch.xml
(Hope that the page is available a while for the sake of this report. It's not my page.)

and try to search inside that page for example for 'script' or 'style'. These are words that occure 4 or 5 times in the text. If you searched for one of these words, try to search 'Previous', then 'Next' again. Firefox wouldn't find it any more.

Actual Results:  
Firefox wouldn't find the searched word when clicking 'Previous' and 'Next' if it already found it once.

Expected Results:  
Find the searched word every time it is searched.



This happens with Firefox 2 and 3, it doesn't matter how old or new, in Linux and Windows, probably also in Mac.
I am not sure what your steps o reproduce actually are in detail. can you give more specifics and try in Safe Mode?
I also believe you mean the "Find" feature.
Summary: Search broken → "Find" not working properly in XML
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b1pre) Gecko/20080925163651 Minefield/3.1b1pre

Works fine for me except that it doesn't wrap around when it hits the bottom of the document.
Summary: "Find" not working properly in XML → "Find" not working properly in pretty-printed XML
It's the same in safe mode:

Here I go again:

1. Go to

http://www.tourabout.com/TouraboutRegionSearch.xml

2. Type Str + f (or its equivalent to Find in this page) from the menu.

3. Type in (for example) script in the find field.

4. Click 'Next' right of the find field. You'll see that the page contains the word 'script'.

5. Click "Previous' right of the find field. You'll notice that the word 'script' could not be found.

It's also possible to say: It doesn't hit around, when it means: it could be found only once, in other words: it doesn't find it any more - even after reloading the page.
I can reproduce the problem in comment 4, too.
Component: General → Find Toolbar
Product: Firefox → Toolkit
QA Contact: general → fast.find
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) 
Gecko/2008092417 Firefox/3.0.3


I have seen the behavior as described in XML files on my local drive;  that is, I can search 'next', but not previous.  I noticed that each time I clicked 'next', the message 'Reached end of page, continued from top' would appear, even though it correctly found the next occurrence of the search term.  

A little experimentation in the XML doc linked in comment 4 showed that I could search forward and backward within the non-tag portion of the document, but as soon as a result was found in a tag I could no longer search backward.  try a search for 'content' this gives two results in tags and two results within the <content> .... </content> portion of the document.  I can search forward and backward between the two matches inside the xml tags, but 'previous' will not show any matches once the current match is an xml tag.

Anyone have an idea where I might start to find some code relating to this problem?
I can confirm this still exists in Windows XP, FF 3.0.7. Simple test:

1) Go to http://www.w3schools.com/XML/note.xml

2) Search for 'heading' (appears twice).

3) Click Next to get to 2nd 'heading' entry.

* 4a) Click Previous --> doesn't work.

* 4b) Click Next --> doesn't wrap around ('continue from top').
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.