aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/PreviewCursor.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/PreviewCursor.tsx b/src/client/views/collections/PreviewCursor.tsx
index ab68fbc46..42b926374 100644
--- a/src/client/views/collections/PreviewCursor.tsx
+++ b/src/client/views/collections/PreviewCursor.tsx
@@ -57,11 +57,13 @@ export class PreviewCursor extends React.Component<PreviewCursorProps> {
@action
onKeyPress = (e: KeyboardEvent) => {
//if not these keys, make a textbox if preview cursor is active!
- if (!e.ctrlKey && !e.altKey) {
+ if (!e.ctrlKey && !e.altKey && !e.defaultPrevented) {
//make textbox and add it to this collection
let [x, y] = this.props.getTransform().transformPoint(this._lastX, this._lastY);
let newBox = Documents.TextDocument({ width: 200, height: 100, x: x, y: y, title: "new" });
this.props.addLiveTextDocuemnt(newBox);
+ e.stopPropagation();
+ e.preventDefault();
}
}