| 690 | 690 | let popupPromise; |
| 691 | 691 | try { |
| 692 | 692 | // If we are updating an extension, the "old" popup is still active. We should close that. |
| 693 | | - await Popup.util.popups.find(popup => popup.content.querySelector('.extensions_info'))?.completeCancelled(); |
| 693 | + let initialScrollTop = 0; |
| 694 | + const oldPopup = Popup.util.popups.find(popup => popup.content.querySelector('.extensions_info')); |
| 695 | + if (oldPopup) { |
| 696 | + initialScrollTop = oldPopup.content.scrollTop; |
| 697 | + await oldPopup.completeCancelled(); |
| 698 | + } |
| 694 | 699 | const htmlDefault = $('<div class="marginBot10"><h3 class="textAlignCenter">Built-in Extensions:</h3></div>'); |
| 695 | 700 | const htmlExternal = $('<div class="marginBot10"><h3 class="textAlignCenter">Installed Extensions:</h3></div>'); |
| 696 | 701 | const htmlLoading = $(`<div class="flex-container alignItemsCenter justifyCenter marginTop10 marginBot5"> |