Search in HTML tab for <form shows 0 results

37 views
Skip to first unread message

David Hollingshead

unread,
Sep 19, 2014, 7:19:50 PM9/19/14
to fir...@googlegroups.com
I had a funky WordPress page that apparently had two <form tags in it when we only wanted one so I opened it up in Firebug to the HTML tab, clicked into that text area, then hit Ctrl+F and search for <form, but the field turned red and I got the error beep which indicated there were no results found. I searched for form instead and it found them... just none of the <form instances even though I was looking at one of them.

See screenshot. I'm not sure how to explain this unless the actual code is formatted differently in which case Firebug should ignore that because I'm searching within the context of its formatted code.
Firebug-form-search.png

Simon Lindholm

unread,
Sep 20, 2014, 4:12:43 PM9/20/14
to fir...@googlegroups.com
Yep. I think the request has come up before, but it would require a quite large refactoring. The search logic currently does a recursive traversal and searches against all possible parts (tag name, attribute name, attribute value).

Possibly we could add a hack so that the precise case "<form" worked, but "<form>", "<form attr", etc. are hard. But note that focus is on https://github.com/firebug/firebug.next/ at the moment.

David H

unread,
Sep 20, 2014, 10:31:11 PM9/20/14
to fir...@googlegroups.com
Strange that it's this complicated when Chrome does it just fine. I'm supposing they've figured out a simpler way to do it that you guys haven't yet.

Simon Lindholm

unread,
Sep 21, 2014, 12:54:49 PM9/21/14
to fir...@googlegroups.com
I wouldn't say it's as much "it's complicated" as it is "you have to do it right from the beginning, or you'll have to rewrite it all".

David H

unread,
Sep 21, 2014, 3:02:04 PM9/21/14
to fir...@googlegroups.com
Wow... so I'm trying to imagine how this can be done:
  • search the raw source code
  • search a text file formatted the way it is in the editor window
  • search the formatted object list
However this means relating the text and objects in the different text instances, and I'm not sure how that would be done simply.

I really don't know how Chrome does it, but if a piece of text appears in the formatted source code window, it should be searchable in the search box exactly as it appears in the formatted source code window. That's just surface-level common sense.

In the meantime, this nonsensical behavior pushes me to use Chrome instead or have a more difficult time using search, which I don't want because Firebug has more tools and I still have to test browser compatibility and search text because of it.

This absolutely needs to be fixed; it's an elementary feature that should work right to begin with. The refactoring would be absolutely worth it, and my guess is they just haven't thought of the proper and most simple way (as in an Occam's Razor way) to do it.

Sebastian Zartner

unread,
Sep 22, 2014, 9:22:13 AM9/22/14
to fir...@googlegroups.com
Yep. I think the request has come up before
Yes, in issue 2302.


I really don't know how Chrome does it, but if a piece of text appears in the formatted source code window, it should be searchable in the search box exactly as it appears in the formatted source code window. That's just surface-level common sense.
While I agree that it would be good to allow a full text search, I closed the issue mentioned above earlier as my believe is that Firebug's current search features within the HTML panel are sufficient. These features include a simple text search, a CSS selector search and an XPath search.
So in your case you'd just need to search for 'form' or '//form'.


This absolutely needs to be fixed; it's an elementary feature that should work right to begin with. The refactoring would be absolutely worth it
From the user perspective, probably, though not from the developer perspective. Without knowing the code in detail, I assume refactoring this functionality would require several weeks, while users already have the possibility to easily find what they want (as shown above).
And as Firebug.next is meant to be built on top of the built-in devtools, this request should rather go to the DevTools team. See therefore the related bug 835896.

Sebastian
 
Reply all
Reply to author
Forward
0 new messages