We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15dd201 commit 7b7bb50Copy full SHA for 7b7bb50
src/LiveDevelopment/BrowserScripts/LiveDevProtocolRemote.js
@@ -459,6 +459,19 @@
459
// for save
460
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s") {
461
e.preventDefault();
462
+
463
+ // to check if user was in between editing text
464
+ // in such cases we first finish the editing and then save
465
+ const activeElement = document.activeElement;
466
+ if (activeElement &&
467
+ activeElement.hasAttribute("contenteditable") &&
468
+ activeElement.hasAttribute("data-brackets-id") &&
469
+ window._LD &&
470
+ window._LD.finishEditing) {
471
472
+ window._LD.finishEditing(activeElement);
473
+ }
474
475
MessageBroker.send({
476
livePreviewEditEnabled: true,
477
saveCurrentDocument: true
0 commit comments