Skip to content

Commit

Permalink
fix slab#815
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Jul 25, 2016
1 parent 5283bfa commit fea4463
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/icon-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ class IconPicker extends Picker {
[].forEach.call(this.container.querySelectorAll('.ql-picker-item'), (item) => {
item.innerHTML = icons[item.dataset.value || ''];
});
this.selectItem(this.container.querySelector('.ql-selected'));
this.defaultItem = this.container.querySelector('.ql-selected');
this.selectItem(this.defaultItem);
}

selectItem(item, trigger) {
super.selectItem(item, trigger);
item = item || this.defaultItem;
this.label.innerHTML = item.innerHTML;
}
}
Expand Down

0 comments on commit fea4463

Please sign in to comment.