Skip to content

Commit 05d3268

Browse files
committed
fix: handle shift when taping over it
1 parent 998b6f7 commit 05d3268

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/components/terminal/terminalTouchSelection.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ export default class TerminalTouchSelection {
310310
this.isHandleDragging = true;
311311
this.dragHandle = handleType;
312312

313+
// Store the initial touch position for delta calculations
314+
const touch = event.touches[0];
315+
this.initialTouchPos = { x: touch.clientX, y: touch.clientY };
316+
313317
// Update handle appearance - ensure we're updating the correct handle
314318
const targetHandle =
315319
handleType === "start" ? this.startHandle : this.endHandle;
@@ -326,6 +330,19 @@ export default class TerminalTouchSelection {
326330
event.stopPropagation();
327331

328332
const touch = event.touches[0];
333+
334+
// Check if there's significant movement before updating selection
335+
const deltaX = Math.abs(touch.clientX - this.initialTouchPos.x);
336+
const deltaY = Math.abs(touch.clientY - this.initialTouchPos.y);
337+
338+
// Only update selection if there's significant movement (prevents micro-movements)
339+
if (
340+
deltaX < this.options.moveThreshold &&
341+
deltaY < this.options.moveThreshold
342+
) {
343+
return;
344+
}
345+
329346
const coords = this.touchToTerminalCoords(touch);
330347

331348
if (coords) {

www/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@
165165

166166
<title>Acode</title>
167167
<!--styles-->
168+
<link rel="stylesheet" href="./css/build/218.css">
169+
<link rel="stylesheet" href="./css/build/32.css">
170+
<link rel="stylesheet" href="./css/build/383.css">
171+
<link rel="stylesheet" href="./css/build/53.css">
172+
<link rel="stylesheet" href="./css/build/609.css">
168173
<link rel="stylesheet" href="./css/build/about.css">
169174
<link rel="stylesheet" href="./css/build/customTheme.css">
170175
<link rel="stylesheet" href="./css/build/donate.css">
171176
<link rel="stylesheet" href="./css/build/fileBrowser.css">
172177
<link rel="stylesheet" href="./css/build/main.css">
173178
<link rel="stylesheet" href="./css/build/plugins.css">
174-
<link rel="stylesheet" href="./css/build/src_pages_quickTools_quickTools_js.css">
175-
<link rel="stylesheet" href="./css/build/src_sidebarApps_extensions_index_js.css">
176-
<link rel="stylesheet" href="./css/build/src_sidebarApps_files_index_js.css">
177-
<link rel="stylesheet" href="./css/build/src_sidebarApps_notification_index_js.css">
178-
<link rel="stylesheet" href="./css/build/src_sidebarApps_searchInFiles_index_js.css">
179179
<link rel="stylesheet" href="./css/build/themeSetting.css">
180180
<!--styles_end-->
181181
</head>

0 commit comments

Comments
 (0)