mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#1272 Optimize performance of context buttons visibility switch
This commit is contained in:
@@ -8081,7 +8081,7 @@ jQuery(async function () {
|
||||
// Check if the click was outside the relevant elements
|
||||
if (!$(e.target).closest('.extraMesButtons, .extraMesButtonsHint').length) {
|
||||
// Transition out the .extraMesButtons first
|
||||
$('.extraMesButtons').transition({
|
||||
$('.extraMesButtons:visible').transition({
|
||||
opacity: 0,
|
||||
duration: 150,
|
||||
easing: 'ease-in-out',
|
||||
@@ -8089,7 +8089,7 @@ jQuery(async function () {
|
||||
$(this).hide(); // Hide the .extraMesButtons after the transition
|
||||
|
||||
// Transition the .extraMesButtonsHint back in
|
||||
$('.extraMesButtonsHint').show().transition({
|
||||
$('.extraMesButtonsHint:not(:visible)').show().transition({
|
||||
opacity: .2,
|
||||
duration: 150,
|
||||
easing: 'ease-in-out'
|
||||
|
Reference in New Issue
Block a user