Skip to content

Commit

Permalink
fix slab#1220
Browse files Browse the repository at this point in the history
If editor was focused, a click is preceded by blur which selection.js
listens to which updates range to null. This SELECTION_CHANGE is
listened to by themes to update their pickers which will result in the
wrong expanded state.
  • Loading branch information
jhchen committed Jan 1, 2017
1 parent 85960b1 commit 2df72b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Picker {
this.buildPicker();
this.select.style.display = 'none';
this.select.parentNode.insertBefore(this.container, this.select);
this.label.addEventListener('click', () => {
this.label.addEventListener('mousedown', () => {
this.container.classList.toggle('ql-expanded');
});
this.select.addEventListener('change', this.update.bind(this));
Expand Down

0 comments on commit 2df72b2

Please sign in to comment.