Autocomplete does not work with nested elements
jeremyfuksa opened this issue · 1 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
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:
- Type "li". autocomplete-html offers the "List Item" snippet as expected.
- 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. - Press Enter or Tab. Nothing happens.
- 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
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.