fix: prevent search field interaction during drag operations#708
Merged
Conversation
Fixed an issue where the search field in fullscreen mode remained interactive during drag-and-drop operations, causing potential conflicts between text input and drag gestures. The search field now properly disables interaction when any item is being dragged by checking the currentlyDraggedId state. The change adds a condition to the search field's interactive property to ensure it only becomes interactive when no drag operation is active (dndItem.currentlyDraggedId === ""). This prevents accidental text input while users are dragging items and improves the overall drag-and-drop user experience. Log: Fixed search field remaining interactive during drag operations in fullscreen mode Influence: 1. Test drag-and-drop operations in fullscreen mode while search field is visible 2. Verify search field becomes non-interactive when dragging starts 3. Confirm search field returns to interactive state after drag operation completes 4. Test search functionality when no drag operations are active 5. Verify the fix doesn't affect search field behavior in normal usage scenarios fix: 修复拖拽操作期间搜索字段保持交互状态的问题 修复了全屏模式下搜索字段在拖放操作期间保持交互状态的问题,该问题可能 导致文本输入和拖拽手势之间的冲突。现在搜索字段在检查到有项目被拖拽时 (currentlyDraggedId状态)会正确禁用交互。 此更改为搜索字段的interactive属性添加了一个条件,确保只有在没有拖拽操作 活动时(dndItem.currentlyDraggedId === "")才变为交互状态。这防止了用户 在拖拽项目时意外输入文本,并改善了整体拖放用户体验。 Log: 修复了全屏模式下拖拽操作期间搜索字段保持交互状态的问题 Influence: 1. 测试全屏模式下搜索字段可见时的拖放操作 2. 验证拖拽开始时搜索字段变为非交互状态 3. 确认拖拽操作完成后搜索字段恢复交互状态 4. 测试没有拖拽操作活动时的搜索功能 5. 验证修复不影响正常使用场景下的搜索字段行为 PMS: BUG-315733 BUG-315729
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnsures the fullscreen search field becomes non-interactive while any drag-and-drop operation is active by gating its interactivity on the drag state in addition to popup visibility. Sequence diagram for search field interactivity during drag-and-dropsequenceDiagram
actor User
participant FullscreenFrame
participant DndItem
participant SearchField
participant FolderGridViewPopup
User->>FullscreenFrame: Enter fullscreen mode
FullscreenFrame->>SearchField: Initialize interactive = !FolderGridViewPopup.visible && DndItem.currentlyDraggedId == ""
User->>DndItem: Start drag on item
DndItem->>DndItem: Set currentlyDraggedId = draggedItemId
FullscreenFrame->>SearchField: Reevaluate interactive
SearchField-->>FullscreenFrame: interactive = false (because currentlyDraggedId != "")
User->>DndItem: Complete drag operation
DndItem->>DndItem: Set currentlyDraggedId = ""
FullscreenFrame->>SearchField: Reevaluate interactive
alt FolderGridViewPopup not visible
SearchField-->>FullscreenFrame: interactive = true
else FolderGridViewPopup visible
SearchField-->>FullscreenFrame: interactive = false
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Instead of directly comparing
dndItem.currentlyDraggedId === "", consider exposing a boolean likedndItem.isDraggingso the binding expresses the intent more clearly and is less coupled to the internal representation of the drag state. - If
dndItemorcurrentlyDraggedIdcan be undefined during initialization or teardown, it may be safer to guard this binding (e.g., via a default value or null-check) to avoid runtime binding errors.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Instead of directly comparing `dndItem.currentlyDraggedId === ""`, consider exposing a boolean like `dndItem.isDragging` so the binding expresses the intent more clearly and is less coupled to the internal representation of the drag state.
- If `dndItem` or `currentlyDraggedId` can be undefined during initialization or teardown, it may be safer to guard this binding (e.g., via a default value or null-check) to avoid runtime binding errors.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
BLumia
approved these changes
Feb 26, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, wjyrich The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed an issue where the search field in fullscreen mode remained interactive during drag-and-drop operations, causing potential conflicts between text input and drag gestures. The search field now properly disables interaction when any item is being dragged by checking the currentlyDraggedId state.
The change adds a condition to the search field's interactive property to ensure it only becomes interactive when no drag operation is active (dndItem.currentlyDraggedId === ""). This prevents accidental text input while users are dragging items and improves the overall drag-and-drop user experience.
Log: Fixed search field remaining interactive during drag operations in fullscreen mode
Influence:
fix: 修复拖拽操作期间搜索字段保持交互状态的问题
修复了全屏模式下搜索字段在拖放操作期间保持交互状态的问题,该问题可能
导致文本输入和拖拽手势之间的冲突。现在搜索字段在检查到有项目被拖拽时
(currentlyDraggedId状态)会正确禁用交互。
此更改为搜索字段的interactive属性添加了一个条件,确保只有在没有拖拽操作
活动时(dndItem.currentlyDraggedId === "")才变为交互状态。这防止了用户 在拖拽项目时意外输入文本,并改善了整体拖放用户体验。
Log: 修复了全屏模式下拖拽操作期间搜索字段保持交互状态的问题
Influence:
PMS: BUG-315733 BUG-315729
Summary by Sourcery
Bug Fixes: