Closed Bug 344189 Opened 18 years ago Closed 18 years ago

if browser.search.openintab pref is set to true Firefox opens two identical tabs for each search

Categories

(Firefox :: Search, defect, P1)

2.0 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 2 beta2

People

(Reporter: ttolonen, Assigned: Gavin)

References

Details

(Keywords: fixed1.8.1, regression)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060709 Firefox/3.0a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060709 Firefox/3.0a1

This was caused by the VK_ENTER/VK_RETURN switch from bug 337386

Reproducible: Always

Steps to Reproduce:
1. set browser.search.openintab
2. search something
3. enjoy the extra tab
This is due to the search latency hack, we now get two events.
Blocks: 337386
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-firefox2?
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox 2 beta2
Version: unspecified → 2.0 Branch
Keywords: regression
Flags: blocking-firefox2? → blocking-firefox2+
Additional information from Bug 344474.  CTRL-Enter or clicking on the Search button with the mouse only opens up one tab.
*** Bug 344474 has been marked as a duplicate of this bug. ***
(In reply to comment #3)
> *** Bug 344474 has been marked as a duplicate of this bug. ***
> 
Hmm, that duplicate had been Confirmed, but now this current bug report is still marked New.

I'm seeing the bug in 2.0 Beta 1, btw.
(In reply to comment #4)
> Hmm, that duplicate had been Confirmed, but now this current bug report is
> still marked New.

This is what New means.  A bug in New status has been confirmed.
This is a hidden pref right now, unless someone steps up to fix it, it likely won't be fixed.
Whiteboard: [at risk]
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Priority: -- → P1
*** Bug 345183 has been marked as a duplicate of this bug. ***
Attached patch patch #1Splinter Review
I think the only reason we were seeing bug 337386 was that the input sometimes resulted in stopSearch being called after the latency timer was set, which would cancel the timer and result in the search never ending, which would make the autocomplete controller wait forever. This patch should fix that, but it needs careful testing to ensure that it doesn't regress bug 337386.
Comment on attachment 230483 [details] [diff] [review]
patch #1

I'd like to try this patch on the trunk to get some widespread testing. In my testing, I noticed that the "search bar doesn't work with enter" bug could be caused by the search bar binding calling stopSearch after an input event, which would cancel the load and make the controller wait indefinitely for the search to return. This fixes that scenario by not cancelling the timer from stopSearch.
Attachment #230483 - Flags: review?(mconnor)
Comment on attachment 230483 [details] [diff] [review]
patch #1

Seems like a good answer!  Let's get this on trunk and see how it works.
Attachment #230483 - Flags: review?(mconnor) → review+
mozilla/browser/components/search/content/search.xml 	1.82
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Oops, I forgot to check in the nsSearchSuggestions.js part of the patch, I did that now.

mozilla/browser/components/search/nsSearchSuggestions.js 	1.8
Whiteboard: [at risk] → [has patch][baking]
The last couple of days my enter key doesn't work all the time anymore.
About 10% of my searches don't react on enter.
Ok, so my patch didn't entirely fix the problem :(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [has patch][baking] → [new patch needed]
I know what the problem is, I will hopefully have a fixed patch shortly.
BTW Gavin, the Enter key issue happens even if browser.search.openintab is set to false.
(In reply to comment #16)
> BTW Gavin, the Enter key issue happens even if browser.search.openintab is set
> to false.

Yeah, that's known (by me). :) Hopefully I'll have a new patch for this sometime soon.
Gavin, any ETA here? two days left!
Attached patch patch #2Splinter Review
The last patch didn't help because _reset() nulled out _listener, which made notify() a no-op anyways. This changes _reset to only null out _listener and _formHistoryResult if there is no timer pending, in which case we've either already sent the _formHistoryResult to _listener or haven't started the timer yet. Either way, the timer will clean itself up after it fires, if it's initialized at all, by setting _formHistoryTimer to null before calling _reset().
Attachment #230483 - Attachment is obsolete: true
Attachment #233890 - Flags: review?(mconnor)
This latest attachment will also fix the regression of bug 337386 on the trunk (caused by the first attachment), in addition to this bug.
Whiteboard: [new patch needed] → [needs review mconnor]
Attachment #233890 - Flags: review?(mconnor) → review+
mozilla/browser/components/search/nsSearchSuggestions.js 	1.9

If anyone sees this bug or bug 337386 on the trunk in a build with this patch, please let me know!
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Whiteboard: [needs review mconnor] → [baking]
Attachment #233890 - Flags: approval1.8.1?
Attachment #233890 - Flags: approval1.8.1?
Attachment #230483 - Attachment description: possible patch → patch #1
Attached patch branch rollupSplinter Review
Attachment #234184 - Flags: approval1.8.1?
Attachment #230483 - Attachment is obsolete: false
Comment on attachment 234184 [details] [diff] [review]
branch rollup

a=mconnor on behalf of drivers for 1.8 branch checkin
Attachment #234184 - Flags: approval1.8.1? → approval1.8.1+
Whiteboard: [baking] → [checkin needed (1.8 branch)]
mozilla/browser/components/search/nsSearchSuggestions.js 	1.1.2.8
mozilla/browser/components/search/content/search.xml 	1.37.2.54
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: