Bug in select code in Auto-Complete component

VERIFIED FIXED

Status

()

Firefox
Location Bar
VERIFIED FIXED
15 years ago
14 years ago

People

(Reporter: eric lindvall, Assigned: Joe Hewitt (gone))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030423 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030423 Mozilla Firebird/0.6

The AutoCompleteController seems to have a bug in the Select code that seems to
be due to a change in how the input controller works (the selecting worked once).

it seems that mInput->SelectTextRange() doesn't like "-1" as the end offset anymore.

Reproducible: Always

Steps to Reproduce:
1. set completedefaultindex="true" in the urlbar in browser.xul
2. type something into the browser urlbar that doesn't start with "http://"
3. see results

Actual Results:  
none of the text is selected

Expected Results:  
the text that wasn't typed in should be selected.

I'll add the patch once i submit the bug.
(Reporter)

Comment 1

15 years ago
Created attachment 121989 [details] [diff] [review]
Patch to fix problem

This seems to fix the problem.
(Reporter)

Updated

15 years ago
Attachment #121989 - Flags: review?(hewitt)
(Reporter)

Updated

15 years ago
Blocks: 203756

Comment 2

14 years ago
I'll confirm this one and bug #203756 so the devs can have a look on it...

=> confirming and setting All/All
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All

Comment 3

14 years ago
Taking QA. Sorry for the bugspam
QA Contact: asa → davidpjames

Comment 4

14 years ago
Does this also fix the bug (at least I think it's a bug) where the cursor is
positioned at the start of the url bar instead of the end?
(Reporter)

Comment 5

14 years ago
no. i don't believe i've seen that behaviour.

Comment 6

14 years ago
That must be a different bug.  If you arrow-down through the items in the
suggested matches dropdown, the cursor moves to the start of the url bar.  It
used to, I'm sure, move to the end.  Maybe that was an intended change, but I
can't see why it would be.
(Reporter)

Comment 7

14 years ago
oh, yes, i believe this fixes that as well.
(Reporter)

Comment 8

14 years ago
Created attachment 129372 [details] [diff] [review]
Improved patch to fix

This also fixes a problem where when using CompleteDefaultIndex, if you select
the end of a url and hit delete, the end of the url re-appears.

This now initializes mSearchString so the Backspaced check in HandleText() will
fire correctly.
Attachment #121989 - Attachment is obsolete: true
(Reporter)

Comment 9

14 years ago
Comment on attachment 129372 [details] [diff] [review]
Improved patch to fix

please review.
Attachment #129372 - Flags: review?(hewitt)

Comment 10

14 years ago
Checked in.  Thanks Eric.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Summary: Bug in select code in Auto-Complete component → Bug in select code in Auto-Complete component

Comment 11

14 years ago
Hmmm... I can't verify this because I don't understand what the problem was to
begin with. I got lost at step 1 in comment #0 :(. Where would I set that?
chrome://browser/content/browser.xul ? But that doesn't make any sense to me.
(Reporter)

Comment 12

14 years ago
this did fix the problem.

the easiest way to turn this on would be to apply the patch in bug 203756 (which
adds a config option to turn "completedefaultindex" on and off).

Comment 13

14 years ago
Ok, I think I understand now - this was essentially an enabling bug to allow
another bug to be fixed. Fair enough.

verifying fixed as per reporter's confirmation; comment 12
Status: RESOLVED → VERIFIED

Updated

14 years ago
Attachment #121989 - Flags: review?(hewitt)

Updated

14 years ago
Attachment #129372 - Flags: review?(hewitt)
You need to log in before you can comment on or make changes to this bug.