#1272 Optimize performance of context buttons visibility switch

This commit is contained in:
Cohee
2023-10-21 15:41:27 +03:00
parent 97d75aef73
commit b4e29bf157
2 changed files with 3 additions and 2 deletions

View File

@@ -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'