diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index d361ec16c..30d565bc1 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1137,11 +1137,7 @@ var FolderIcon = class FolderIcon { this.view = new FolderView(); - this.actor.connect('clicked', () => { - this._ensurePopup(); - this.view.actor.vscroll.adjustment.value = 0; - this._openSpaceForPopup(); - }); + this.actor.connect('clicked', this.open.bind(this)); this.actor.connect('destroy', this.onDestroy.bind(this)); this.actor.connect('notify::mapped', () => { if (!this.actor.mapped && this._popup) @@ -1164,6 +1160,12 @@ var FolderIcon = class FolderIcon { this._popup.actor.destroy(); } + open() { + this._ensurePopup(); + this.view.actor.vscroll.adjustment.value = 0; + this._openSpaceForPopup(); + } + getAppIds() { return this.view.getAllItems().map(item => item.id); }