Closed Bug 1225459 Opened 9 years ago Closed 8 years ago

Pressing Up and Down doesn't switch between elements found by "Search HTML"

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox45 affected)

RESOLVED WONTFIX
Tracking Status
firefox45 --- affected

People

(Reporter: arni2033, Unassigned)

References

()

Details

(Keywords: regression)

>>> My Info:   Win7_64, Nightly 45, 32bit, ID 20151116030208, new profile <<<
STR:
1. Open this "data:" url:
>   data:text/html,<div></div><div></div><div></div>
2. Open devtools -> Inspector
3. Type "div" in "search with CSS selectors" field, press Enter
4. Press Up / Down several times

Result:       No visible action
Expectations: This action should switch to previous/next found element in markup view

Pushlog:
>   https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f00a24682d57e48a287e11bcfc72e562929fd007&tochange=961911623a6f2ec1d036c7b12a5117ebbeff45d8
You can press Enter or ctrl+g to go to the next result (ctrl+shift+g to go the previous result).

I'm not sure if we should keep support for up/down since the new shortcuts better match other find features (like style editor and the browser's find functionality).  That said, the Debugger supports all of ctrl+(shift)+g, Enter, and up/down.  Patrick, Helen, any opinions?
Flags: needinfo?(pbrosset)
Flags: needinfo?(hholmes)
In my opinion, because the focus is in the input box, up/down should map to going to the beginning and ending of the string in that field. Enter should send you to the next matching element. Shift+ctrl/cmd+G should send you back a matching element.

Whatever we all decide, the debugger and inspector (and anything else using this kind of search) should match.
Flags: needinfo?(hholmes)
(In reply to Brian Grinstead [:bgrins] from comment #1)
> the Debugger supports all of ctrl+(shift)+g, Enter, and up/down
That's not correct. Current state of affairs (on latest Nighly):

                 |    Inspector    |    Debugger    |    Findbar     |
Enter            |     next        |     next       |     next       |
Shift+Enter      |     --          |     prev       |     prev       |
Up/Down          |     --          |     next/prev  |     moves page |
----------------------------------------------------------------------
Ctrl+(Shift+)G   | Searches on current web page for a string typed   |
(Shift+)F3       | in findbar, switches to the next/prev result. If  |
                 | Findbar is empty, it opens and focuses Findbar    |

Up/Down is good for switching between results, because it's only 1 button, but could you at least implement Shift+Enter in markup-view for switching between results?
Correction:   Ctrl+(Shift+)G   _does_ work in debugger, but only if the code itself has focus.
              In comment 3 I described how shortcuts operate when filter field is focused.
(In reply to arni2033 from comment #3)
This text table is awesome, haha

I guess my druthers would look something like this, personally:

                 |    Inspector    |    Debugger    |    Findbar     |
Enter            |     next        |     next       |     next       |
Shift+Enter      |     prev        |     prev       |     prev       |
Up/Down          |  affects focus  |  affects focus |  affects focus | 'd text box
----------------------------------------------------------------------
Ctrl+(Shift+)G   | Searches on current web page for a string typed   |
(Shift+)F3       | in findbar, switches to the next/prev result. If  |
                 | Findbar is empty, it opens and focuses Findbar    |

Still going to push for consistency all around no matter we decide Up/Down _should_ do. Our search boxes should all act the same.
(In reply to Brian Grinstead [:bgrins] from comment #1)
> You can press Enter or ctrl+g to go to the next result (ctrl+shift+g to go
> the previous result).
> 
> I'm not sure if we should keep support for up/down since the new shortcuts
> better match other find features (like style editor and the browser's find
> functionality).  That said, the Debugger supports all of ctrl+(shift)+g,
> Enter, and up/down.  Patrick, Helen, any opinions?
My first impression was that not having up/down work anymore in nightly was a regression (it does cycle through matches in the inspector in aurora). But if up/down are normally used in text boxes to move the focus, then I guess we should go with Helen's solution.
Flags: needinfo?(pbrosset)
Has STR: --- → yes
See Also: → 1259060
Unless I'm mistaken, we agreed to go with comment 5 (up/down only have affect on the selected text in the search box).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Summary: Pressing Up and Down doesn't switch between elements in markup-view → Pressing Up and Down doesn't switch between elements found by "Search HTML"
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.