diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index 16aa24c64..2f88ce5fe 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -480,9 +480,9 @@ var SwitcherList = GObject.registerClass({ let item = this._items[index]; if (item.allocation.x1 < value) - value = Math.min(0, item.allocation.x1); + value = Math.max(0, item.allocation.x1); else if (item.allocation.x2 > value + pageSize) - value = Math.max(upper, item.allocation.x2 - pageSize); + value = Math.min(upper, item.allocation.x2 - pageSize); this._scrollableRight = true; adjustment.ease(value, {