Closed Bug 290878 Opened 19 years ago Closed 19 years ago

Address Autocomplete don't work, always first entry was taken (regression)

Categories

(Core :: Web Painting, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: tobias, Assigned: roc)

References

(Depends on 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050418 Mnenhy/0.7.2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050418 Mnenhy/0.7.2.0

Starting with Seamonkey Build 2005041805 the E-Mail Address Autocomplete is broken. 

When starting to type the first letters, the list of addresses shows up, but I
can't choose an suggestion without the first one. 

Everytime the first Entry will be taken for addressing at To: Field, and also
the typing. Typing first three letters addressing looks like: "tobias Fischer
<tobias@first.entry.in.list>", not "Tobias..."

Last known good Build was 2005041710 for me, next tested is 2005041805 which was
regressed.

Reproducible: Always

Steps to Reproduce:
1. Compose new Message
2. Start typing in To: Field for addressing
3. Try to choose *not* the first suggestion

Actual Results:  
Every time the first shown Entry is taken from Autocomplete Suggestion-List.

Expected Results:  
Be able to choose one Address from List free.

This regressed between 2005-04-17 10:00 and 2005-04-18 05:00, add Bonsai Query:

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=day&mindate=2005-04-17+10%3A00%3A00&maxdate=2005-04-18+05%3A00%3A00&cvsroot=%2Fcvsroot
Keywords: regression
bz: This might be a possible regression from Bug 290494. When i hover over a
autocomplete entry, i get this in JS Console (for every mousemove):
JavaScript error: chrome://global/content/autocomplete.xml, line 1544: col.value
has no properties
Assignee: sspitzer → roc
Status: UNCONFIRMED → NEW
Component: MailNews: Composition → Layout: View Rendering
Ever confirmed: true
QA Contact: ian
Attached patch Proposed patchSplinter Review
This is the "simple" fix.  The other approach is to just use event.client* here
and to make the tree code try to figure out whether it's inside a popup and if
so try to adjust for the bogosity.  But really, we should fix bug 291083.
Attachment #181245 - Flags: superreview?(roc)
Attachment #181245 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #181245 - Flags: review?(mconnor)
Attachment #181245 - Flags: review?(mconnor) → review+
Comment on attachment 181245 [details] [diff] [review]
Proposed patch

You mean, not only are event client coordinates wrong for popups, but box
object coordinates are wrong for popups in lists?
Attachment #181245 - Flags: review?(neil.parkwaycc.co.uk) → review+
> but box object coordinates are wrong for popups in lists?

You mean the x/y coordinates of a box object?  Those look like someone
copy/pasted the offset* code from HTML elements at some point.  I don't know
that they're "wrong", since I can't tell what they're trying to be (no
documentation), but they more or less correctly return the offset of the
padding-box of the thing the box object is for from the padding-box of the
document element, under the assumption that all scrollable things are scrolled
to (0,0).

I'm not quite sure what you mean by "popups in lists"....
Well, the only difference between compose autocomplete and browser autocomplete
(which still works) is that the compose widget is inside a listbox, so I assume
that's affecting some set of coordinates somehow, and wondering why.
Oh, that sort of list.  Possible.  Not sure. In any case, box object coordinates
are not client coordinates.  Should they be?  If so, I'll file a bug on that.
(In reply to comment #7)
>In any case, box object coordinates are not client coordinates. Should they be?
I'd hate to think what else they could be, so I made some measurements.
navigator       window         textbox         tree
client          (0, 0)         (299, 35) ?     (298, 57)
screen          (6, 22)        (303, 55)       (304, 79)
I don't understand where this client/screen discrepancy arises in the textbox.
compose         window         textbox         tree
client          (0, 0)         (128, 101)      (415, 102) !
screen          (6, 22)        (134, 123)      (135, 140)
What effect does overflow have on the HTML offsetX/Y properties?
> I don't understand where this client/screen discrepancy arises in the textbox.

"client" measures from padding box to padding box; screen gives the screen
position of the border box (this is all for box object).

> What effect does overflow have on the HTML offsetX/Y properties?

Absolutely none.  offset* is computed as if all scrollable stuff were scrolled
to 0,0.
(In reply to comment #9)
>>What effect does overflow have on the HTML offsetX/Y properties?
>offset* is computed as if all scrollable stuff were scrolled to 0,0.
Not very useful for hit-testing in listboxes then (popup bug notwithstanding).
Yes, that was exactly my point.  Again, should I file a bug on that?  Looking at
the tree, people are comparing boxObject.x to event.clientX and such...
(In reply to comment #0)

> Expected Results:  
> Be able to choose one Address from List free.

It seems, that this is no problem, if you do the selection with cursdown/up keys
on the keyboard. IMHO the selection only fails, if you use the mouse.
Yes, we're well aware.  I suggest you read the patch.
Yes, I'd like to be able to compare events with box objects, please.
*** Bug 291362 has been marked as a duplicate of this bug. ***
Attachment #181245 - Flags: superreview?(roc) → superreview+
Comment on attachment 181245 [details] [diff] [review]
Proposed patch

requesting approval for yet another event coord regression fix...
Attachment #181245 - Flags: approval1.8b2?
*** Bug 291446 has been marked as a duplicate of this bug. ***
Comment on attachment 181245 [details] [diff] [review]
Proposed patch

a=asa
Attachment #181245 - Flags: approval1.8b2? → approval1.8b2+
Fixed
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I have tested this several Times with CREATURE-Tinderbox-Build 2005042420 and
Autocomplete and choosing an Address with Mouse works fine (almost for me). 

Because that I mark this as Verified=Fixed now.
Status: RESOLVED → VERIFIED
*** Bug 278398 has been marked as a duplicate of this bug. ***
I just don't understand why the [Bug 278398] (address typed gets replaced with
first email address from dropdown list after Tab is pressed) has been marked as
a duplicate of this bug (290878)??? It is much older than this one, so
semantically correct this bug is duplicate of 278398 bug.
https://bugzilla.mozilla.org/show_bug.cgi?id=278398
Not when the newer bug is fixed.
Actually the version of this bug that I reported is slightly different again.
What I observe is that if I type the beginning of a name into the address pane
of 'Compose' in 'Mail/News', all the addresses connected with that
name-beginning do appear on successive lines. But it is at that point that the
bug strikes: if I click on any of them, it is always the first one that is
entered. If, on the other hand, I use the down-arrow on the keyboard to scroll
down the successive addresses and stop at the desired one, I can use 'Enter' on
the keyboard to enter that address.
Depends on: 291083
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: