Enable vertical scrolling in /buttons

Closes #3012
This commit is contained in:
Cohee 2024-10-23 23:00:08 +03:00
parent d7c575994d
commit e03f1b14e6

View File

@ -2091,7 +2091,7 @@ async function buttonsCallback(args, text) {
popupContainer.innerHTML = safeValue; popupContainer.innerHTML = safeValue;
popupContainer.appendChild(buttonContainer); popupContainer.appendChild(buttonContainer);
popup = new Popup(popupContainer, POPUP_TYPE.TEXT, '', { okButton: 'Cancel' }); popup = new Popup(popupContainer, POPUP_TYPE.TEXT, '', { okButton: 'Cancel', allowVerticalScrolling: true });
popup.show() popup.show()
.then((result => resolve(typeof result === 'number' ? resultToButtonMap.get(result) ?? '' : ''))) .then((result => resolve(typeof result === 'number' ? resultToButtonMap.get(result) ?? '' : '')))
.catch(() => resolve('')); .catch(() => resolve(''));