willyelm / xatom-debug

A Simple Debugger Provider for Atom
MIT License
71 stars 5 forks source link

Uncaught TypeError: editor.element.getScrollTop is not a function #36

Open Apollon77 opened 7 years ago

Apollon77 commented 7 years ago

[Enter steps to reproduce:]

  1. Have a MD file (I edited the README.md from node-schedule)
  2. Open Plugin "Markdown Preview" to show a rendered version of the md file

Atom: 1.18.0 x64 Electron: 1.3.15 OS: Mac OS X 10.12.6 Thrown From: xatom-debug package 1.6.10

Stack Trace

Uncaught TypeError: editor.element.getScrollTop is not a function

At /Users/ingof/.atom/packages/xatom-debug/lib/editor/editor-manager.js:223

TypeError: editor.element.getScrollTop is not a function
    at EditorManager.getEditorPositionFromEvent (/packages/xatom-debug/lib/editor/editor-manager.js:223:62)
    at EditorManager.listenExpressionEvaluations (/packages/xatom-debug/lib/editor/editor-manager.js:252:35)
    at HTMLDivElement.expressionHandler (/packages/xatom-debug/lib/editor/editor-manager.js:159:57)

Commands

 29x -4:05.1.0 core:backspace (input.hidden-input)
     -3:37.5.0 core:move-right (input.hidden-input)
     -3:36.8.0 editor:newline (input.hidden-input)
     -3:28 core:backspace (input.hidden-input)
     -3:16.6.0 core:move-up (input.hidden-input)
  2x -3:16.3.0 editor:move-to-first-character-of-line (input.hidden-input)
  3x -3:15.7.0 core:select-down (input.hidden-input)
  2x -3:13.7.0 core:move-up (input.hidden-input)
  2x -3:13.2.0 core:move-down (input.hidden-input)
  3x -2:53.9.0 core:backspace (input.hidden-input)
     -0:52.5.0 core:move-left (input.hidden-input)
     -0:35.7.0 core:save (input.hidden-input)
     -0:27.2.0 markdown-preview:toggle (input.hidden-input)

Non-Core Packages

api-workbench 0.8.46 
autocomplete-clang 0.11.3 
build 0.68.0 
busy 0.7.0 
busy-signal 1.4.3 
copy-with-syntax 0.0.3 
file-icons 2.1.9 
git-control 0.9.0 
git-plus 7.9.3 
git-time-machine 1.5.9 
gitlab 0.1.3-7 
intentions 1.1.2 
language-arduino 0.4.3 
language-ini 1.19.0 
language-ino 0.2.0 
linter 2.2.0 
linter-gcc 0.7.1 
linter-jshint 3.1.5 
linter-ui-default 1.6.3 
minimap 4.29.2 
node-debugger 1.10.1 
platformio-ide 2.0.0-beta.7 
platformio-ide-debugger 1.2.3 
platformio-ide-terminal 2.5.3 
pretty-json 1.6.3 
pull-request 0.2.1 
remote-sync 4.1.5 
symbols-tree-view 0.14.0 
tabs-to-spaces 1.0.3 
tool-bar 1.1.0 
travis-ci-status 1.3.1 
xatom-debug 1.6.10 
xatom-debug-nodejs 0.9.3 
samhiatt commented 6 years ago

Danggit, I thought my fix worked, but apparently not...

It seems that if the Markdown preview is open when I restart atom then I don't see the "editor.element.getScrollTop is not a function" error. If I markdown preview is closed when I start atom, then I will see the "editor.element.getScrollTop is not a function" error. That easy workaround seems to work for now and I'm able to use the markdown preview without going insane from the error messages.

pierreh commented 5 years ago

Is there any fix for this? it is still happening :-(