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} type
|
||||||
* @param {string} inputValue - Value to set the input to.
|
* @param {string} inputValue - Value to set the input to.
|
||||||
* @param {PopupOptions} options - Options for the popup.
|
* @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
|
* @returns
|
||||||
*/
|
*/
|
||||||
function callPopup(text, type, inputValue = '', { okButton, rows, wide, large } = {}) {
|
function callPopup(text, type, inputValue = '', { okButton, rows, wide, large, allowHorizontalScrolling, allowVerticalScrolling } = {}) {
|
||||||
dialogueCloseStop = true;
|
dialogueCloseStop = true;
|
||||||
if (type) {
|
if (type) {
|
||||||
popup_type = type;
|
popup_type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#dialogue_popup').toggleClass('wide_dialogue_popup', !!wide);
|
$('#dialogue_popup').toggleClass('wide_dialogue_popup', !!wide);
|
||||||
|
|
||||||
$('#dialogue_popup').toggleClass('large_dialogue_popup', !!large);
|
$('#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');
|
$('#dialogue_popup_cancel').css('display', 'inline-block');
|
||||||
switch (popup_type) {
|
switch (popup_type) {
|
||||||
|
@@ -2081,6 +2081,7 @@ grammarly-extension {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rm_stat_block {
|
.rm_stat_block {
|
||||||
@@ -2101,6 +2102,14 @@ grammarly-extension {
|
|||||||
min-width: var(--sheldWidth);
|
min-width: var(--sheldWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.horizontal_scrolling_dialogue_popup {
|
||||||
|
overflow-x: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical_scrolling_dialogue_popup {
|
||||||
|
overflow-y: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
#bulk_tag_popup_holder,
|
#bulk_tag_popup_holder,
|
||||||
#dialogue_popup_holder {
|
#dialogue_popup_holder {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Reference in New Issue
Block a user