Closed Bug 350079 Opened 16 years ago Closed 8 months ago

esc does nothing in search box

Categories

(Firefox :: Search, defect, P3)

defect

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox-esr91 --- wontfix
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- verified

People

(Reporter: tuukka.tolvanen, Assigned: pyjacpp)

References

(Regressed 1 open bug)

Details

(Keywords: regression, Whiteboard: [fxsearch])

Attachments

(1 file)

esc does not clear search field
firefox trunk 20060822 linux
this worked (well, on second esc press really) in fx 1.5
select all as in url bar is an alternative, bug 348142

Not such a big deal whether it selects all or clears, since the fx1.5 behavior worked in both fields for the typing entirely new value case: esc, esc, type new value
Regression between 1.9a1_2006061513 and 1.9a1_2006061516.
Bonsai link:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-06-15+13&maxdate=2006-06-15+16&cvsroot=%2Fcvsroot
I suspect this is caused by the patch in bug 246237, more spefically, the removal of mSearchString.Truncate(0); in nsAutoCompleteController::RevertTextValue.
I haven't tested this, though.
Blocks: 246237
Flags: blocking-firefox2?
Is this specified behaviour, or consistent with other apps?  This seems like an accidental behaviour, rather than something I would expect to work.
(In reply to comment #3)
> Is this specified behaviour, or consistent with other apps?  This seems like an
> accidental behaviour, rather than something I would expect to work.
> 

We do it too for the location bar (bug 47863). And we also have bug 307345, bug  244761 and bug 348142.
As noted on bug 348142, our old behavior in the search bar was already inconsistent and required pressing escape twice, which meant it was hard to discover and likely accidental fallout.

I'm inclined to agree that pressing escape should reset the field to "how it was before" (which presumably always means clearing it?), but I don't think this should block Firefox 2.  Instead, let's figure out how this is all working and how to hook escape up properly if we want to do that, so it doesn't require multiple keypresses.
(In reply to comment #5)
> I'm inclined to agree that pressing escape should reset the field to "how it
> was before" (which presumably always means clearing it?), but I don't think

If my previous search was for "foo", and I edit the text, and hit ESC, I would expect to see "foo" again.
as Peter points out, the previous behaviour seems accidental, we should revert to the previous search term, as beltzner says, but that is not a blocker for Firefox2
Flags: blocking-firefox2? → blocking-firefox2-
If beltzner's behavior isn't implemented in the mean time shouldn't we at least make the url bar and the search field behave the same?  Although this strikes me as wanted for 3, so hopefully this gets it back on the radar.
OS: Linux → All
it would be nice to get this fixed before a possible location/search bar merge happens, what would be at least two release cycles away anyways :-).
Hardware: x86 → All
Currently, hitting escape in the location bar selects all the text. Escape twice doesn't do anything. 

In the search bar, escape has no result whether you hit it once or twice.
Duplicate of this bug: 1055030
Priority: -- → P3
Whiteboard: [fxsearch]
Rank: 35
Severity: normal → minor
Duplicate of this bug: 1490916

Fix bug, now escape in the search box (if the popup is disimissed) will select all the content.

Assignee: nobody → pyjacpp
Status: NEW → ASSIGNED
Attachment #9231747 - Attachment description: Bug 350079 - Esc in search box now selects all. r=mak → Bug 350079 - Esc in search box now selects all and reverts. r=mak

Masayuki, we are hitting an assertion in TextEditor when trying to undo a transaction. I suspect our approach may not be the right one. Can you help us, or forward to someone that could? Please check on Phabricator.

Flags: needinfo?(masayuki)

Commented in Phabricator.

Flags: needinfo?(masayuki)
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/9237deee110b
Esc in search box now selects all and reverts. r=mak
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

I've managed to reproduce the issue with a Fx91.0a1 build.
The issue is verified fixed using Fx95.0b2 and latest Fx96.0a1 on windows 10, ubuntu 20.04 and macOS. The input from the search box is now successfully dismissed after pressing the escape key twice. The behavior is now similar to the address bar.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.