mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: update save action to use active file instead of disk
This commit is contained in:
parent
6caef65a4a
commit
28ed22455c
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ import type {
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import type App from "../components/App";
|
import type App from "../components/App";
|
||||||
import type { AppState } from "../types";
|
import type { AppState } from "../types";
|
||||||
import { actionSaveFileToDisk } from "../actions";
|
import { actionSaveToActiveFile } from "../actions";
|
||||||
|
|
||||||
const getTransform = (
|
const getTransform = (
|
||||||
width: number,
|
width: number,
|
||||||
|
@ -395,7 +395,7 @@ export const textWysiwyg = ({
|
||||||
handleSubmit();
|
handleSubmit();
|
||||||
} else if (event.key === KEYS.S && event[KEYS.CTRL_OR_CMD]) {
|
} else if (event.key === KEYS.S && event[KEYS.CTRL_OR_CMD]) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
app.actionManager.executeAction(actionSaveFileToDisk, "ui");
|
app.actionManager.executeAction(actionSaveToActiveFile, "ui");
|
||||||
} else if (event.key === KEYS.ENTER && event[KEYS.CTRL_OR_CMD]) {
|
} else if (event.key === KEYS.ENTER && event[KEYS.CTRL_OR_CMD]) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (event.isComposing || event.keyCode === 229) {
|
if (event.isComposing || event.keyCode === 229) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue