Skip to content

Commit

Permalink
Prevent icon-picker from triggering unnecessary layout reflow (#2269)
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrogaspar authored and jhchen committed Aug 24, 2018
1 parent a5894ab commit f348070
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/icon-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class IconPicker extends Picker {
selectItem(target, trigger) {
super.selectItem(target, trigger);
const item = target || this.defaultItem;
if (this.label.innerHTML === item.innerHTML) return;
this.label.innerHTML = item.innerHTML;
}
}
Expand Down

0 comments on commit f348070

Please sign in to comment.