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:
Wolfsblvt 2024-03-30 05:41:54 +01:00
parent 80f4bd4d9e
commit ea4ba57408
2 changed files with 13 additions and 3 deletions

View File

@ -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) {

View File

@ -2081,6 +2081,7 @@ grammarly-extension {
display: flex;
flex-direction: column;
overflow-y: hidden;
overflow-x: hidden;
}
.rm_stat_block {
@ -2101,6 +2102,14 @@ grammarly-extension {
min-width: var(--sheldWidth);
}
.horizontal_scrolling_dialogue_popup {
overflow-x: unset !important;
}
.vertical_scrolling_dialogue_popup {
overflow-y: unset !important;
}
#bulk_tag_popup_holder,
#dialogue_popup_holder {
display: flex;