Skip to content

Commit

Permalink
Get rid of unused SelectionDOMObserver
Browse files Browse the repository at this point in the history
  • Loading branch information
smoores-dev committed Oct 3, 2023
1 parent b427452 commit 3417741
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 37 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React-ProseMirror Demo</title>
<script type="module" crossorigin src="/react-prosemirror/assets/index-bf3602ca.js"></script>
<script type="module" crossorigin src="/react-prosemirror/assets/index-191f530f.js"></script>
<link rel="stylesheet" href="/react-prosemirror/assets/index-17fff6c1.css">
</head>
<body>
Expand Down
32 changes: 0 additions & 32 deletions src/SelectionDOMObserver.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/prosemirror-view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class EditorView {
this.nodeViews = buildNodeViews(this)
this.docView = null as unknown as NodeViewDesc

this.domObserver = new (props.DOMObserver ?? DOMObserver)(this, (from, to, typeOver, added) => readDOMChange(this, from, to, typeOver, added))
this.domObserver = new DOMObserver(this, (from, to, typeOver, added) => readDOMChange(this, from, to, typeOver, added))
this.init();
}

Expand Down Expand Up @@ -797,6 +797,4 @@ export interface DirectEditorProps extends EditorProps {
/// [applied](#state.EditorState.apply). The callback will be bound to have
/// the view instance as its `this` binding.
dispatchTransaction?: (tr: Transaction) => void

DOMObserver?: typeof DOMObserver
}

0 comments on commit 3417741

Please sign in to comment.