Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has the Chrome console's autocomplete feature gotten more aggressive?

It seems like lately I have been having been getting hung up on the auto-completion drop down when using the console in Chrome DevTools. It seems like it has suddenly gotten more aggressive. I have never had a problem with the feature until the other day when I was trying to enter commands into the console quickly in order to test things. I wasn't sure why it wasn't working right. when I'd hit Enter auto-completion kept popping up and not executing what I typed. At first it seems as if auto-completion was activating whenever I would hit Enter to execute my code. However, it began to look like it was only popping up when I would end a statement with ;.

For example, typing the following statement into the console and pressing Enter would not cause the autocomplete drop down to activate:

console.log('did it')

However, if I add a semicolon then as soon as I press ; a number of milliseconds later the autocompletion feature immediately pops up:

console.log('did it');

At this point if I press Enter it will simply select the first entry, $, and add it as the next statement so we get:

console.log('did it');$

Auto-completion preventing execution

I know this is not really a big deal, after all, the only reason you would need the semicolon is for entering in multiple statements. However, I feel like in the past I've always added a semicolon ; to the end of simple single test statements such as the console.log shown above not activated the auto-completion, being able to execute it by just hitting Enter.

I definitely feel like my console's auto-completion is being activated more aggressive than it used to.

Has anyone else felt like the auto-completion in the console is activating too often all of the sudden? I am wondering whether or not this could have actually been changed in Chrome or if somehow I have made my console start acting this way with a setting or something?

While writing this I noticed that it seems not to only be after ; that auto-completion seems to pop up when it hadn't before. If you refer to Chrome DevTools - Using the Console you'll see that auto-completion is only referred to once:

The Console attempts to evaluate any JavaScript expression you enter at the shell prompt, upon pressing the Return or Enter key. The Console provides auto-completion and tab-completion. As you type expressions, property names are automatically suggested. If there are multiple properties with the same prefix, pressing the Tab key cycles through them. Pressing the right arrow key accepts the current suggestion. The current suggestion is also accepted by pressing the Tab key if there is only one matched property.

After this it goes on to say that we can use Shift+Enter in order to enter a multi-line expression and it gives the following example:

ShiftEnterCombo
(source: google.com)

This is something I know for sure I have done plenty of times in the past with no problems from auto-completion. When I try to type the code in the above image I get as far as:

var add = function (val1, val2) {

Then when I press Shift+Enter instead of going to a new line like I am positive it did before (for me at least). Apparently anytime a new statement is started it will pop up. Has anyone else started getting highly annoyed at this feature as of very recently? Does anyone know if there's a way I could have caused this behavior?

like image 494
Cory Gross Avatar asked Jul 27 '13 16:07

Cory Gross


1 Answers

Whoever answered my question before deleted their answer. I would like to close the question as it has been answered. This is indeed a bug as stated in the comments above and on the deleted answer. Anyone else that is here because they are experiencing problems as well will have to wait for the release to make it down to their version of Chrome, with Canary getting it first of course. You could presumably install an earlier version of Chrome to get around this as well. I know this is not directly about coding, but I see no reason to close it now when others may find the information useful.

Link to the Chrome Issue referencing this problem: https://code.google.com/p/chromium/issues/detail?id=263925

like image 177
Cory Gross Avatar answered Oct 11 '22 10:10

Cory Gross