diff options
author | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-22 13:57:10 -0400 |
---|---|---|
committer | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-22 13:57:10 -0400 |
commit | 658ded478c273654174cd2706f8b3e021b8ceb95 (patch) | |
tree | 7526f7850dd3702b9746125d2f4349a0d6aea8ee /src/client/util/DocumentManager.ts | |
parent | 157060f7e6029c76765aa20d8fdbe325401a3880 (diff) | |
parent | 8db50c6ba0be83b85c896043da53e40c17523e90 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into youtube-api-muhammed
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index bb1345044..262194a40 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -3,7 +3,7 @@ import { DocumentView } from '../views/nodes/DocumentView'; import { Doc, DocListCast, Opt } from '../../new_fields/Doc'; import { FieldValue, Cast, NumCast, BoolCast, StrCast } from '../../new_fields/Types'; import { listSpec } from '../../new_fields/Schema'; -import { undoBatch } from './UndoManager'; +import { undoBatch, UndoManager } from './UndoManager'; import { CollectionDockingView } from '../views/collections/CollectionDockingView'; import { CollectionView } from '../views/collections/CollectionView'; import { CollectionPDFView } from '../views/collections/CollectionPDFView'; @@ -142,7 +142,9 @@ export class DocumentManager { if (!forceDockFunc && (docView = DocumentManager.Instance.getDocumentView(doc))) { docView.props.Document.libraryBrush = true; if (linkPage !== undefined) docView.props.Document.curPage = linkPage; - docView.props.focus(docView.props.Document, willZoom); + UndoManager.RunInBatch(() => { + docView!.props.focus(docView!.props.Document, willZoom); + }, "focus"); } else { if (!contextDoc) { if (docContext) { |