(e)
| 1643 | |
| 1644 | // 移动端触摸处理 |
| 1645 | function handleTouchStart(e) { |
| 1646 | if (e.target.closest('.quick-reply-actions')) { |
| 1647 | return; // 如果点击的是按钮,不启动拖拽 |
| 1648 | } |
| 1649 | |
| 1650 | const touch = e.touches[0]; |
| 1651 | touchStartY = touch.clientY; |
| 1652 | draggedElement = this; |
| 1653 | draggedIndex = parseInt(this.dataset.index); |
| 1654 | isTouchDragging = false; |
| 1655 | |
| 1656 | // 延迟启动拖拽,避免与点击冲突 |
| 1657 | setTimeout(() => { |
| 1658 | if (draggedElement === this) { |
| 1659 | isTouchDragging = true; |
| 1660 | this.classList.add('category-item-dragging'); |
| 1661 | } |
| 1662 | }, 150); |
| 1663 | } |
| 1664 | |
| 1665 | function handleTouchMove(e) { |
| 1666 | if (!isTouchDragging || !draggedElement) return; |
nothing calls this directly
no outgoing calls
no test coverage detected