mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 12:47:35 +01:00
Mobile doesn't like select2
This commit is contained in:
parent
d81c94de0b
commit
dc5deaf47c
@ -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,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user