New issue
Advanced search Search tips

Issue 872915 link

Starred by 21 users

Issue metadata

Status: Duplicate
Merged: issue 879351
Owner:
Closed: Sep 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Dev tools console autocomplete predicts wrong value

Reported by string...@lucidchart.com, Aug 9

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36

Steps to reproduce the problem:
This can be experienced at https://www.stringham.me/autocomplete.html

To reproduce, load this code in chrome:

class Foo {
    get value() {
        return 3;
    }
}

class Bar extends Foo {
    constructor() {
        super();
        this.valueId = 1;
    }
}

window.bar = new Bar();

then open the dev tools and type: bar.value

It appears that dev tools prioritizes autocomplete for keys that are on the object, rather than on the prototype chain. The earlier it is in the prototype chain the higher it shows up in autocomplete.

bar.hasOwnProperty('valueId') is true, and bar.hasOwnProperty('value') is false, so 'valueId' is prioritized in the autocomplete list, even when I have typed bar.value.

What is the expected behavior?
When I have typed something that matches one of the auto complete options exactly, it should prioritize that option over others.

Similarly, if the autocomplete option is the same as what I have already typed, I should not have to press enter twice to execute the command. Right now if I type bar.valueId, I have to press enter twice for it to execute: Once to accept the auto complete, and once to submit.

What went wrong?
When I type bar.value and press enter, it autocompletes to bar.valueId. I either have to select the "value" option from the autocomplete list, or press esc to execute bar.value.

Did this work before? Yes 67

Chrome version: 68.0.3440.84  Channel: n/a
OS Version: 
Flash Version: 

In earlier versions of chrome, valueId is still prioritized in the autocomplete options, but pressing enter executed the command instead of interacting with the autocomplete options. You had to press tab to select the autocomplete option.
 
Labels: Needs-Triage-M68 Needs-Bisect
Cc: viswa.karala@chromium.org
Labels: -Needs-Bisect Triaged-ET Target-70 M-70 FoundIn-70 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on chrome reported version# 68.0.3440.84, latest stable# 68.0.3440.106 and on latest chrome version# 70.0.3517.0 using Mac 10.12.6, Windows-10 and Ubuntu 14.04. As this issue is seen from M-60(60.0.3112.0), hence considering this issue as Non-Regression and marking it as Untriaged.

Thanks!
Owner: einbinder@chromium.org
Status: Assigned (was: Untriaged)
Mergedinto: 879351
Status: Duplicate (was: Assigned)

Sign in to add a comment