mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
delay before options menu auto-show
This commit is contained in:
@ -4890,7 +4890,7 @@ function openAlternateGreetings() {
|
|||||||
|
|
||||||
function addAlternateGreeting(template, greeting, index, getArray) {
|
function addAlternateGreeting(template, greeting, index, getArray) {
|
||||||
const greetingBlock = $('#alternate_greeting_form_template .alternate_greeting').clone();
|
const greetingBlock = $('#alternate_greeting_form_template .alternate_greeting').clone();
|
||||||
greetingBlock.find('.alternate_greeting_text').on('input', async function() {
|
greetingBlock.find('.alternate_greeting_text').on('input', async function () {
|
||||||
const value = $(this).val();
|
const value = $(this).val();
|
||||||
const array = getArray();
|
const array = getArray();
|
||||||
array[index] = value;
|
array[index] = value;
|
||||||
@ -6190,10 +6190,15 @@ $(document).ready(function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
optionsDiv.on('mouseenter touchstart', () => clearTimeout(hideOptionsTimeout));
|
optionsDiv.on('mouseenter touchstart', () => clearTimeout(hideOptionsTimeout));
|
||||||
optionsButtonDiv.on('mouseenter touchstart', () => clearTimeout(hideOptionsTimeout));
|
optionsButtonDiv.on('mouseenter touchstart', () => {
|
||||||
|
clearTimeout(hideOptionsTimeout);
|
||||||
|
hideOptionsTimeout = setTimeout(() => {
|
||||||
|
optionsDiv.show(200);
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
optionsDiv.on('mouseleave', () => hideOptionsTimeout = setTimeout(hideOptions, 500));
|
optionsDiv.on('mouseleave', () => hideOptionsTimeout = setTimeout(hideOptions, 500));
|
||||||
optionsButtonDiv.on('mouseleave', () => hideOptionsTimeout = setTimeout(hideOptions, 500));
|
optionsButtonDiv.on('mouseleave', () => hideOptionsTimeout = setTimeout(hideOptions, 500));
|
||||||
optionsDiv.show(200);
|
//optionsDiv.show(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#options_button").on('mouseenter click touchstart', showOptions);
|
$("#options_button").on('mouseenter click touchstart', showOptions);
|
||||||
|
Reference in New Issue
Block a user