Closed weixiongmei closed 5 years ago
This is definitely not a bug in Tern, and probably not a bug generally. If you're planning to type a new property name, don't activate autocompletion. Tern correctly reports a single property here, and CodeMirror's autocompletion completes those immediately by default.
Still wondering if this is not a bug, why it wouldn’t happen when defining the first property or the third property and so on? Why it only happens on the second property? Thanks
As I mentioned, CodeMirror's autocompletion will by default complete right away when there's only one option. That's what you're seeing here.
Repeatable Link:
https://ternjs.net/doc/demo/index.html#simple
Revision: 0.24.1Bug: (refer to the ====BUG==== tag in the code above) When trying to do the autocompletion for defining the second property of the prototype, it always automatically insert the name of the first property that's defined. But after the second property is defined, this bug seems not going to happen anymore.