Closed Bug 660806 Opened 13 years ago Closed 13 years ago

Autocomplete shows during history navigation

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox6 fixed)

VERIFIED FIXED
Firefox 6
Tracking Status
firefox6 --- fixed

People

(Reporter: msucan, Assigned: msucan)

Details

(Whiteboard: [fixed-in-devtools])

Attachments

(1 file)

The autocomplete suggestions show during history navigation, in some cases.

STR:

1. Open the Web Console.
2. Type window.location and press Enter
3. Press the Up arrow key to go to the previous entry.

Expected result: you get window.location and no autocomplete suggestions.

Actual result: you get window.location and autocomplete suggestions.

This is easy to fix.
Assignee: nobody → mihai.sucan
Proposed patch.

The fix is really simple: we need to update lastInputValue when we do programmatic changes to the input value, like when going up/down in the history. This prevents the code from showing the popup when it's not needed, during keyboard events handling.

Mochitest included.

(I would like this to go in mozilla-aurora, if we can get it reviewed soon enough. Thanks!)
Attachment #540829 - Flags: review?(rcampbell)
Status: NEW → ASSIGNED
Comment on attachment 540829 [details] [diff] [review]
[in-devtools] proposed patch

ah, I see what you did there. Looks good.
Attachment #540829 - Flags: review?(rcampbell) → review+
Comment on attachment 540829 [details] [diff] [review]
[in-devtools] proposed patch

Thanks for the r+ Rob!

Asking for review from Mossop.
Attachment #540829 - Flags: review?(dtownsend)
Attachment #540829 - Flags: review?(dtownsend) → review+
Whiteboard: [land-in-devtools]
Comment on attachment 540829 [details] [diff] [review]
[in-devtools] proposed patch

Thanks for the r+!

Asking for mozilla-aurora approval. This patch fixes an important bug affecting the usability of the new Autocomplete popup for the Web Console.

Try server results:
http://tbpl.mozilla.org/?tree=Try&rev=36c6de45e4f1
Attachment #540829 - Flags: approval-mozilla-aurora?
Whiteboard: [land-in-devtools] → [fixed-in-devtools]
Comment on attachment 540829 [details] [diff] [review]
[in-devtools] proposed patch

http://hg.mozilla.org/projects/devtools/rev/c5fece76dc09
Attachment #540829 - Attachment description: proposed patch → [in-devtools] proposed patch
Attachment #540829 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
http://hg.mozilla.org/mozilla-central/rev/2b19247a5036

http://hg.mozilla.org/releases/mozilla-aurora/rev/1ed1994feedc
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 6
Mozilla/5.0 (X11; Linux i686; rv:7.0a1) Gecko/20110629 Firefox/7.0a1

Verified issue on Ubuntu 11.04, Mac OS X 10.6, WinXP, Win7 using steps from Comment 0 and it's no longer reproducible.

Setting status to Verified Fixed.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: