only sort if garage is active tab

This commit is contained in:
DESKTOP-GENO133\IvanPlex 2024-02-02 07:07:04 -07:00
parent 812e768f93
commit b4d86f415c

View File

@ -109,9 +109,10 @@ function sortVehicles(desc) {
var touchtimer;
var touchduration = 800;
function detectLongTouch(sender) {
event.preventDefault();
if (!touchtimer) {
touchtimer = setTimeout(function () { sortGarage(sender, true); detectTouchEndPremature(sender); }, touchduration);
if ($(sender).hasClass("active")) {
if (!touchtimer) {
touchtimer = setTimeout(function () { sortGarage(sender, true); detectTouchEndPremature(sender); }, touchduration);
}
}
}
function detectTouchEndPremature(sender) {