mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:14:03 +01:00
Disallow drag-n-drop when editing request name
This commit is contained in:
@@ -680,6 +680,8 @@ function SidebarItem({
|
||||
() => ({
|
||||
type: ItemTypes.REQUEST,
|
||||
item: () => {
|
||||
// Cancel drag when editing
|
||||
if (editing) return null;
|
||||
onDragStart(itemId);
|
||||
return { id: itemId, itemName };
|
||||
},
|
||||
@@ -943,7 +945,7 @@ function SidebarItem({
|
||||
<input
|
||||
ref={handleFocus}
|
||||
defaultValue={itemName}
|
||||
className="bg-transparent outline-none w-full"
|
||||
className="bg-transparent outline-none w-full cursor-text"
|
||||
onBlur={handleBlur}
|
||||
onKeyDown={handleInputKeyDown}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user