Skip to content

Commit 5d0e848

Browse files
committed
refactor: shortcuts processor out as its not active in core context
1 parent 8d079fa commit 5d0e848

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/LiveDevelopment/BrowserScripts/LiveDevProtocolRemote.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,16 @@
589589
}
590590
}
591591

592+
// duplicate element: Ctrl+D / Cmd+D
593+
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "d") {
594+
595+
// Only handle element cut if not editing text and in edit mode
596+
if (!isEditingText && !isActiveElementPhoenixTool && isInEditMode && window._LD.handleCutElement) {
597+
e.preventDefault();
598+
window._LD.handleDuplicateElement();
599+
}
600+
}
601+
592602
// Copy: Ctrl+C / Cmd+C - operates on selected element
593603
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "c") {
594604

tracking-repos.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"phoenixPro": {
3-
"commitID": "3826a7180c9463ecf02f4051e78696d503c7c6f1"
3+
"commitID": "362d14dffdbac13b851d4591ee07dd9827bb1c33"
44
}
55
}

0 commit comments

Comments
 (0)