mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Mobile doesn't like select2
This commit is contained in:
@@ -8473,6 +8473,7 @@ jQuery(async function () {
|
||||
'.ui-widget',
|
||||
'.text_pole',
|
||||
'#toast-container',
|
||||
'.select2-results',
|
||||
];
|
||||
for (const id of forbiddenTargets) {
|
||||
if (clickTarget.closest(id).length > 0) {
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { api_server_textgenerationwebui, getRequestHeaders, setGenerationParamsFromPreset } from "../script.js";
|
||||
import { getDeviceInfo } from "./RossAscends-mods.js";
|
||||
|
||||
let models = [];
|
||||
|
||||
@@ -63,11 +64,16 @@ function getMancerModelTemplate(option) {
|
||||
}
|
||||
|
||||
jQuery(function () {
|
||||
$('#mancer_model').on('change', onMancerModelSelect).select2({
|
||||
$('#mancer_model').on('change', onMancerModelSelect);
|
||||
|
||||
const deviceInfo = getDeviceInfo();
|
||||
if (deviceInfo && deviceInfo.device.type === 'desktop') {
|
||||
$('#mancer_model').select2({
|
||||
placeholder: 'Select a model',
|
||||
searchInputPlaceholder: 'Search models...',
|
||||
searchInputCssClass: 'text_pole',
|
||||
width: '100%',
|
||||
templateResult: getMancerModelTemplate,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user