atom/autocomplete-html

Autocomplete does not work with nested elements

jeremyfuksa opened this issue · 1 comments

Prerequisites

Description

autocomplete-html works as expected when starting an element on a line of its own. However, when attempting to add an HTML element nested within another, the elements show up in the autocomplete list but are not expandable.

Steps to Reproduce

Using <li><a href="/">Link</a></li> as an example:

  1. Type "li". autocomplete-html offers the "List Item" snippet as expected.
  2. When the cursor is inside the <li> element, type "a". The <a> element shows up in the autocomplete list, but does not have the green tab icon next to it. It only has the red "<>" icon.
  3. Press Enter or Tab. Nothing happens.
  4. Press that key again and that key registers. If hitting tab twice, the element does not autocomplete, but autocomplete-html continues to suggest attributes as if it had.

Expected behavior: I expect the anchor element to expand.

Actual behavior: See items 3 and 4 in "Steps to Reproduce".

Reproduces how often: 100% of the time

Versions

macOS 10.13.3

Atom : 1.24.0
Electron: 1.6.16
Chrome : 56.0.2924.87
Node : 7.4.0

rsese commented

Thanks for the report!

This looks like a duplicate of atom/autocomplete-plus#932 so you can subscribe there for updates if you'd like. This repo might be better for the issue, but since there's a bunch of discussion in atom/autocomplete-plus#932, we'll stick with that one for now.


Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.

For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.