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