mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix scrolling and width of global WI
This commit is contained in:
@@ -1876,9 +1876,9 @@
|
||||
</div>
|
||||
<div id="wi-holder" class="margin5">
|
||||
<div class="justifyContentSpaceAround wi-settings flex-container gap10px alignitemscenter">
|
||||
<div id="WIMultiSelector" class="flex alignSelfStart range-block">
|
||||
<div id="WIMultiSelector" class="flex2 flex alignSelfStart range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<small>Active World</small>
|
||||
<small>Active World(s)</small>
|
||||
</div>
|
||||
<div class="range-block-range">
|
||||
<select id="world_info" multiple>
|
||||
@@ -1886,7 +1886,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" flex-container flexFlowColumn">
|
||||
<div class="flex2 flex-container flexFlowColumn">
|
||||
<div class="flex range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<label for="world_info_character_strategy">
|
||||
@@ -1937,7 +1937,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="range-block flex-container flexFlowColumn">
|
||||
<div class="flex1 range-block flex-container flexFlowColumn">
|
||||
<label title="Entries can activate other entries by mentioning their keywords" class="checkbox_label">
|
||||
<input id="world_info_recursive" type="checkbox" />
|
||||
<small>
|
||||
|
@@ -1081,12 +1081,18 @@ jQuery(() => {
|
||||
$(document).ready(function () {
|
||||
registerSlashCommand('world', onWorldInfoChange, [], "– sets active World, or unsets if no args provided", true, true);
|
||||
})
|
||||
|
||||
let selectScrollTop = null;
|
||||
|
||||
$("#world_info").on('mousedown change', async function (e) {
|
||||
if (deviceInfo.device.type === 'desktop') {
|
||||
e.preventDefault();
|
||||
const option = $(e.target);
|
||||
const selectElement = $(this)[0];
|
||||
selectScrollTop = selectElement.scrollTop;
|
||||
option.prop('selected', !option.prop('selected'));
|
||||
await delay(1);
|
||||
selectElement.scrollTop = selectScrollTop;
|
||||
}
|
||||
|
||||
onWorldInfoChange('__notSlashCommand__');
|
||||
|
Reference in New Issue
Block a user