Skip to content

Commit

Permalink
create div.suggestion-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Katy DeCorah authored Mar 21, 2019
1 parent 6cbf65b commit 262b813
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 262b813

Please sign in to comment.