MCPcopy Create free account
hub / github.com/dajie111/nodeseek-userscript / handleReplyTouchStart

Function handleReplyTouchStart

quickReply.js:1142–1160  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1140
1141 // 移动端触摸处理
1142 function handleReplyTouchStart(e) {
1143 if (e.target.closest('.quick-reply-actions')) {
1144 return; // 如果点击的是按钮,不启动拖拽
1145 }
1146
1147 const touch = e.touches[0];
1148 replyTouchStartY = touch.clientY;
1149 replyDraggedElement = this;
1150 replyDraggedIndex = parseInt(this.dataset.index);
1151 isReplyTouchDragging = false;
1152
1153 // 延迟启动拖拽,避免与点击冲突
1154 setTimeout(() => {
1155 if (replyDraggedElement === this) {
1156 isReplyTouchDragging = true;
1157 this.classList.add('reply-item-dragging');
1158 }
1159 }, 150);
1160 }
1161
1162 function handleReplyTouchMove(e) {
1163 if (!isReplyTouchDragging || !replyDraggedElement) return;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected