Comment to '[Mobile Bug] Cannot Reorder Media in Albums'
  • let isDragging = false;
    
    
    document.addEventListener('contextmenu', function(e) {
        e.preventDefault();
    }, false);
    
    
    document.addEventListener('touchstart', function(e) {
        // Allow drag and other touch interactions
        if (e.touches.length === 1) {
            isDragging = false;
            setTimeout(() => {
                if (!isDragging) {
                    e.preventDefault();
                }
            }, 300); // Adjust timeout to desired long press threshold
        }
    }, false);
    
    
    document.addEventListener('touchmove', function(e) {
        if (e.touches.length === 1) {
            isDragging = true;
        }
    }, false);
    
    
    document.addEventListener('mousedown', function(e) {
        if (e.detail > 1) {
            e.preventDefault();
        }
    }, false);
    
    
    document.addEventListener('touchend', function(e) {
        if (e.touches.length > 1) {
            e.preventDefault();
        }
    }, false);