Skip to content

Commit

Permalink
🚧 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jul 12, 2020
1 parent 19d213b commit aed38cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/codemirror-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class CodeMirrorAdapter extends IEditorAdapter<CodeMirror.Editor> {
this._removeHover();
this._removeTooltip();
// Show-hint addon doesn't remove itself. This could remove other uses in the project
this.cm.getWrapperElement().getElementsByClassName('CodeMirror-hints').forEach((e) => e.remove());
this.editor.getWrapperElement().querySelectorAll('.CodeMirror-hints').forEach((e) => e.remove());
this.editor.off('change', this.editorListeners.change);
this.editor.off('cursorActivity', this.editorListeners.cursorActivity);
this.editor.getWrapperElement().removeEventListener('mousemove', this.editorListeners.mouseover);
Expand Down Expand Up @@ -311,11 +311,12 @@ class CodeMirrorAdapter extends IEditorAdapter<CodeMirror.Editor> {
this.connection.on(key as any, this.connectionListeners[key]);
});


const mouseLeaveListener = this.handleMouseLeave.bind(this);
this.editor.getWrapperElement().addEventListener('mouseleave', mouseLeaveListener);
this.editorListeners.mouseleave = mouseLeaveListener;


const mouseOverListener = this.handleMouseOver.bind(this);
this.editor.getWrapperElement().addEventListener('mousemove', mouseOverListener);
this.editorListeners.mouseover = mouseOverListener;
Expand Down

0 comments on commit aed38cc

Please sign in to comment.