aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-01 10:03:06 -0400
committerbob <bcz@cs.brown.edu>2019-04-01 10:03:06 -0400
commit5940a2dce5b45382521cd20b4770732dcbc3e732 (patch)
tree75c62648e85a9c6a7840ff2a527a9063d0b4526d /src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
parent5b348089bdc33e1e3b8e78ce51925b40793cb2cd (diff)
fixed inking problem - blinking cursors don't play nicely with ink
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/PreviewCursor.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/PreviewCursor.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx b/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
index 339e056a8..877de8846 100644
--- a/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
+++ b/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
@@ -1,4 +1,4 @@
-import { action, observable } from "mobx";
+import { action, observable, trace } from "mobx";
import { observer } from "mobx-react";
import { Document } from "../../../../fields/Document";
import { Documents } from "../../../documents/Documents";
@@ -84,11 +84,12 @@ export class PreviewCursor extends React.Component<PreviewCursorProps> {
let p = this.props.getContainerTransform().transformPoint(this._lastX, this._lastY);
if (this._visible && this._previewDivRef.current)
this._previewDivRef.current!.focus();
+ trace();
return (
- <div className="previewCursorView" tabIndex={0} ref={this._previewDivRef} onBlur={this.onBlur} onPointerDown={this.onPointerDown}>
+ <div className="previewCursorView" onBlur={this.onBlur} onPointerDown={this.onPointerDown}>
{this.props.children}
{!this._visible ? (null) :
- <div className="previewCursor" id="previewCursor" style={{ transform: `translate(${p[0]}px, ${p[1]}px)` }}>I</div>}
+ <div className="previewCursor" tabIndex={0} ref={this._previewDivRef} id="previewCursor" style={{ transform: `translate(${p[0]}px, ${p[1]}px)` }}>I</div>}
</div>
)
}