mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix horizontal scrollbar appearing in popups
- Fix that annoying horizontal scrollbar appearing in popups, e.g. the tag popup when you drag tags around - Still provide possibility to make popups actually utilize scrollbars
This commit is contained in:
@@ -6810,18 +6810,19 @@ function onScenarioOverrideRemoveClick() {
|
||||
* @param {string} type
|
||||
* @param {string} inputValue - Value to set the input to.
|
||||
* @param {PopupOptions} options - Options for the popup.
|
||||
* @typedef {{okButton?: string, rows?: number, wide?: boolean, large?: boolean }} PopupOptions - Options for the popup.
|
||||
* @typedef {{okButton?: string, rows?: number, wide?: boolean, large?: boolean, allowHorizontalScrolling?: boolean, allowVerticalScrolling?: boolean }} PopupOptions - Options for the popup.
|
||||
* @returns
|
||||
*/
|
||||
function callPopup(text, type, inputValue = '', { okButton, rows, wide, large } = {}) {
|
||||
function callPopup(text, type, inputValue = '', { okButton, rows, wide, large, allowHorizontalScrolling, allowVerticalScrolling } = {}) {
|
||||
dialogueCloseStop = true;
|
||||
if (type) {
|
||||
popup_type = type;
|
||||
}
|
||||
|
||||
$('#dialogue_popup').toggleClass('wide_dialogue_popup', !!wide);
|
||||
|
||||
$('#dialogue_popup').toggleClass('large_dialogue_popup', !!large);
|
||||
$('#dialogue_popup').toggleClass('horizontal_scrolling_dialogue_popup', !!allowHorizontalScrolling);
|
||||
$('#dialogue_popup').toggleClass('vertical_scrolling_dialogue_popup', !!allowVerticalScrolling);
|
||||
|
||||
$('#dialogue_popup_cancel').css('display', 'inline-block');
|
||||
switch (popup_type) {
|
||||
|
Reference in New Issue
Block a user