Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create div.suggestions-wrapper #28

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ var List = function(component) {
this.component = component;
this.items = [];
this.active = 0;
this.wrapper = document.createElement('div');
this.wrapper.className = 'suggestions-wrapper';
this.element = document.createElement('ul');
this.element.className = 'suggestions';
this.wrapper.appendChild(this.element);

// selectingListItem is set to true in the time between the mousedown and mouseup when clicking an item in the list
// mousedown on a list item will cause the input to blur which normally hides the list, so this flag is used to keep
// the list open until the mouseup
this.selectingListItem = false;

component.el.parentNode.insertBefore(this.element, component.el.nextSibling);
component.el.parentNode.insertBefore(this.wrapper, component.el.nextSibling);
return this;
};

Expand Down