Clicking an autocomplete entry in the search bar no longer starts the search with the selected entry (Error: aEvent has no properties)

RESOLVED FIXED in Firefox 2 beta2

Status

()

Firefox
Search
P1
normal
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Ria Klaassen (not reading all bugmail), Assigned: Pam Greene)

Tracking

({fixed1.8.1})

2.0 Branch
Firefox 2 beta2
fixed1.8.1
Points:
---
Bug Flags:
blocking-firefox2 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

2.81 KB, patch
Gavin
: review+
Ben Goodger (use ben at mozilla dot org for email)
: superreview+
mconnor
: approval1.8.1+
Details | Diff | Splinter Review
1. In the search box start typing inter.. and choose a suggestion
2. Result: suggestion is copied to the box but it does not go automatically to the search result. 
3. In the JS Console you see the error:

Error: aEvent has no properties
Source File: chrome://browser/content/search/search.xml
Line: 431

Expected behaviour: hitting Enter should not be necessary.
Regression (if this is a regression and not intended behaviour) 
between 1.9a1_2006060912 and 1.9a1_2006060914:
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-06-09+11%3A00&maxdate=2006-06-09+15%3A00
(Reporter)

Comment 1

12 years ago
I see the same in branch.
(Assignee)

Comment 2

12 years ago
If I understand this report correctly, then I don't see the problem in
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1b1) Gecko/20060710 BonEcho/2.0b1.

I type "inter" in the search box, use down-arrow to highlight one of the suggestions, and press return to choose it.  I'm taken directly to a search result page without needing to press return again.  Ria, is that not what you're seeing, or not what you're expecting?
(Reporter)

Comment 3

12 years ago
The bug does not occur with the keyboard. Once you've used the keyboard to select, you need to restart the browser first to reproduce the bug (only with the mouse).
(Assignee)

Comment 4

12 years ago
Created attachment 228839 [details] [diff] [review]
Fixes issue

* Null-check aEvent in handleSearchCommand, since mouse-initiated searches pass null events.
* Clear the enter event after any search, so leftover non-null events from previous keyboard-initiated searches aren't used for mouse searches.

Holding down the alt key while choosing an autocomplete entry with the mouse won't have any effect on whether the search opens in a new tab.  That's perhaps unfortunate, but it matches what the URL bar does.
Assignee: nobody → pamg.bugs
Status: NEW → ASSIGNED
Attachment #228839 - Flags: review?(gavin.sharp)
(Assignee)

Updated

12 years ago
Flags: blocking-firefox2?
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox 2 beta2
The search bar should match the URL bar behaviour wrt clicks/arrows/etc
Flags: blocking-firefox2? → blocking-firefox2+
(Assignee)

Comment 6

12 years ago
I agree; that's what this patch does.
(Assignee)

Updated

12 years ago
Priority: -- → P1

Updated

12 years ago
Whiteboard: [has patch][needs review gavin]
Attachment #228839 - Flags: review?(gavin.sharp) → review+
Whiteboard: [has patch][needs review gavin] → [has patch]
(Assignee)

Updated

12 years ago
Attachment #228839 - Flags: superreview?(bugs)
Comment on attachment 228839 [details] [diff] [review]
Fixes issue

sr=ben@mozilla.org
Attachment #228839 - Flags: superreview?(bugs) → superreview+
*** Bug 345233 has been marked as a duplicate of this bug. ***
Summary: Enter should not be needed to go to the suggestion (Error: aEvent has no properties) → Clicking an autocomplete entry in the search bar no longer starts the search with the selected entry (Error: aEvent has no properties)
Version: Trunk → 2.0 Branch
(Assignee)

Comment 9

12 years ago
Landed on trunk for baking.
Whiteboard: [has patch] → [baking]
(Assignee)

Updated

12 years ago
Attachment #228839 - Flags: approval1.8.1?
Comment on attachment 228839 [details] [diff] [review]
Fixes issue

a=mconnor on behalf of drivers for checkin to the 1.8 branch
Attachment #228839 - Flags: approval1.8.1? → approval1.8.1+
(Assignee)

Comment 11

12 years ago
Landed on branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [baking]
You need to log in before you can comment on or make changes to this bug.