diff options
| author | bob <bcz@cs.brown.edu> | 2019-12-16 13:22:43 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-12-16 13:22:43 -0500 |
| commit | 6c96238283acb38db79234f67966709b90f02527 (patch) | |
| tree | 76fa2edf200f37abb93f8d0ed6b4807805778c79 /src/client/views/PreviewCursor.tsx | |
| parent | 7472ef16f30edec4647233c58e570367ccb37c4d (diff) | |
fixes to focus() from tree view. removed scrollbars from collectionview (when floating doc is out of view).
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
| -rw-r--r-- | src/client/views/PreviewCursor.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx index 208bc2b70..9706d0f99 100644 --- a/src/client/views/PreviewCursor.tsx +++ b/src/client/views/PreviewCursor.tsx @@ -1,4 +1,4 @@ -import { action, observable } from 'mobx'; +import { action, observable, runInAction } from 'mobx'; import { observer } from 'mobx-react'; import "normalize.css"; import * as React from 'react'; @@ -6,7 +6,6 @@ import "./PreviewCursor.scss"; import { Docs } from '../documents/Documents'; import { Doc } from '../../new_fields/Doc'; import { Transform } from "../util/Transform"; -import { TraceMobx } from '../../new_fields/util'; @observer export class PreviewCursor extends React.Component<{}> { @@ -25,7 +24,7 @@ export class PreviewCursor extends React.Component<{}> { paste = (e: ClipboardEvent) => { if (PreviewCursor.Visible && e.clipboardData) { const newPoint = PreviewCursor._getTransform().transformPoint(PreviewCursor._clickPoint[0], PreviewCursor._clickPoint[1]); - PreviewCursor.Visible = false; + runInAction(() => PreviewCursor.Visible = false); if (e.clipboardData.getData("text/plain") !== "") { // tests for youtube and makes video document |
