Closed
Bug 244900
Opened 21 years ago
Closed 19 years ago
autocomplete does not set focus before mousemove event
Categories
(SeaMonkey :: Location Bar, defect)
SeaMonkey
Location Bar
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mozilla, Assigned: neil)
References
Details
Attachments
(1 file, 2 obsolete files)
|
3.31 KB,
patch
|
iannbugzilla
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
The selection in the autocomplete selection component appearing while typing in
the location bar is not setting current focus if the mouse is not moved.
If you do not move the mouse and click on the autocompleted item you want to use
it is instead interbitated as "enter" or "go".
Reproducible: Always
Steps to Reproduce:
1. Place the cursor just below the location bar
2. Type anything that interduces the autocomplete-selection bar
3. Click the left ("action") mouse button.
Actual Results:
The browser navigates the to incomplete URL typed instead of the autocompleted
URL actually clicked upon/selected.
Expected Results:
When the autocomplete bar appear it should look at the location on the mouse to
determind initial selection.
This is not a problem with the native selection component, ie. used in Internet
Explorer
I have replicated this bug (244900) in Win XP Pro: Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0.
Comment 2•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050307
Confirm
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•19 years ago
|
||
Attachment #205469 -
Flags: review?(db48x)
Updated•19 years ago
|
Assignee: location-bar → ajschult
OS: Windows XP → All
Hardware: PC → All
Comment 4•19 years ago
|
||
*** Bug 168623 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 5•19 years ago
|
||
Attachment #205621 -
Flags: superreview?(jag)
Attachment #205621 -
Flags: review?(iann_bugzilla)
Comment on attachment 205621 [details] [diff] [review]
More extensive patch including some code simplification
>Index: autocomplete.xml
>===================================================================
.
.
> <handlers>
> <handler event="mouseout" action="this.textbox.view.selectedIndex = null;"/>
>- <handler event="mouseup" action="this.textbox.onResultClick();"/>
>+ <handler event="mouseup"><![CDATA[
>+ this.textbox.view.selectedIndex = this.getHoverRow(event);
>+ this.textbox.onResultClick();
>+ ]]></handler>
Don't we need to test for (this.textbox.resultsPopup.selectedIndex == null) like in the original patch or this always the case?
Comment 7•19 years ago
|
||
*** Bug 192925 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
Attachment #205469 -
Attachment is obsolete: true
Attachment #205469 -
Flags: review?(db48x)
Comment 8•19 years ago
|
||
Comment on attachment 205621 [details] [diff] [review]
More extensive patch including some code simplification
With the patch applied, I get:
JavaScript error: , line 0: uncaught exception: [Exception... "Not enough arguments [nsITreeBoxObject.getCellAt]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: chrome://global/content/autocomplete.xml :: getHoverRow :: line 1595" data: no]
Comment 9•19 years ago
|
||
*** Bug 193626 has been marked as a duplicate of this bug. ***
Comment 10•19 years ago
|
||
> JavaScript error: , line 0: uncaught exception: [Exception... "Not enough
> arguments [nsITreeBoxObject.getCellAt]" nsresult: "0x80570001
+ var row = this.textbox.view.treeBoxObject.getCellAt(x, y);
should be getRowAt(x, y);
| Assignee | ||
Comment 11•19 years ago
|
||
(In reply to comment #6)
>>+ <handler event="mouseup"><![CDATA[
>>+ this.textbox.view.selectedIndex = this.getHoverRow(event);
>>+ this.textbox.onResultClick();
>>+ ]]></handler>
>Don't we need to test for (this.textbox.resultsPopup.selectedIndex == null)
>like in the original patch or this always the case?
I guess I should only call onResultClick if the index is not null.
(In reply to comment #10)
>>+ var row = this.textbox.view.treeBoxObject.getCellAt(x, y);
>should be getRowAt(x, y);
Doh :-[
Want a new patch?
Comment 12•19 years ago
|
||
(In reply to comment #11)
> (In reply to comment #6)
> >>+ <handler event="mouseup"><![CDATA[
> >>+ this.textbox.view.selectedIndex = this.getHoverRow(event);
> >>+ this.textbox.onResultClick();
> >>+ ]]></handler>
> >Don't we need to test for (this.textbox.resultsPopup.selectedIndex == null)
> >like in the original patch or this always the case?
> I guess I should only call onResultClick if the index is not null.
>
> (In reply to comment #10)
> >>+ var row = this.textbox.view.treeBoxObject.getCellAt(x, y);
> >should be getRowAt(x, y);
> Doh :-[
>
> Want a new patch?
>
Probably best.
| Assignee | ||
Comment 13•19 years ago
|
||
Assignee: ajschult → neil.parkwaycc.co.uk
Attachment #205621 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #206271 -
Flags: superreview?(jag)
Attachment #206271 -
Flags: review?(iann_bugzilla)
Attachment #205621 -
Flags: superreview?(jag)
Attachment #205621 -
Flags: review?(iann_bugzilla)
Comment 14•19 years ago
|
||
Comment on attachment 206271 [details] [diff] [review]
Revised patch
>Index: autocomplete.xml
>===================================================================
>+ <method name="getHoverRow">
...
>+ var row = this.textbox.view.treeBoxObject.getRowAt(x, y);
>+ if (row >= 0)
>+ return row;
> else
>+ return null;
nit: return after else
sr=jag
Attachment #206271 -
Flags: superreview?(jag) → superreview+
Comment 15•19 years ago
|
||
Comment on attachment 206271 [details] [diff] [review]
Revised patch
r=me with jags nit fixed :-)
Attachment #206271 -
Flags: review?(iann_bugzilla) → review+
| Assignee | ||
Comment 16•19 years ago
|
||
Fix checked in to the trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 17•19 years ago
|
||
Note that bug 306538 fixed this problem in toolkit's autocomplete.xml by adding a mousedown handler:
https://bugzilla.mozilla.org/attachment.cgi?id=194715&action=diff
| Assignee | ||
Comment 18•19 years ago
|
||
(In reply to comment #17)
>Note that bug 306538 fixed this problem in toolkit's autocomplete.xml by adding
>a mousedown handler:
OK, so who wants to come up with a list of (dis)advantages for down, up or both?
Updated•17 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•