Skip to content

Commit c7bdb49

Browse files
committed
fix: in popped out live preview ctrl-shift-z does redo now
1 parent be8cccb commit c7bdb49

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/LiveDevelopment/BrowserScripts/LiveDevProtocolRemote.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,15 @@
446446
window.document.addEventListener("click", onDocumentClick);
447447
window.document.addEventListener("keydown", function (e) {
448448
// for undo. refer to LivePreviewEdit.js file 'handleLivePreviewEditOperation' function
449-
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "z") {
449+
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "z" && !e.shiftKey) {
450450
MessageBroker.send({
451451
livePreviewEditEnabled: true,
452452
undoLivePreviewOperation: true
453453
});
454454
}
455455

456-
// for redo
457-
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "y") {
456+
// for redo - supports both Ctrl+Y and Ctrl+Shift+Z (Cmd+Y and Cmd+Shift+Z on Mac)
457+
if ((e.ctrlKey || e.metaKey) && (e.key.toLowerCase() === "y" || (e.key.toLowerCase() === "z" && e.shiftKey))) {
458458
MessageBroker.send({
459459
livePreviewEditEnabled: true,
460460
redoLivePreviewOperation: true

0 commit comments

Comments
 (0)