73CN0109y-Packages / folded-code-preview

Just a simple package that allows you to hover over collapsed code and preview the contents
MIT License
1 stars 1 forks source link

Uncaught TypeError: Cannot read property 'element' of undefined #4

Open bradicus1036 opened 7 years ago

bradicus1036 commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.1 ia32 Electron: 1.6.15 OS: Microsoft Windows 7 Professional Thrown From: folded-code-preview package 0.2.4

Stack Trace

Uncaught TypeError: Cannot read property 'element' of undefined

At C:\Users\newj\.atom\packages\folded-code-preview\lib\folded-code-preview.js:54

TypeError: Cannot read property 'element' of undefined
    at /packages/folded-code-preview/lib/folded-code-preview.js:54:45)
    at HTMLSpanElement.handle (/packages/scroll-color/node_modules/jquery/dist/jquery.js:5559:29)
    at HTMLBodyElement.dispatch (/packages/scroll-color/node_modules/jquery/dist/jquery.js:5206:27)
    at HTMLBodyElement.elemData.handle (/packages/scroll-color/node_modules/jquery/dist/jquery.js:5014:28)

Commands

     -2:04.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)

Non-Core Packages

atom-json-color 0.6.0 
bottom-dock 0.4.4 
busy-signal 1.4.3 
file-icons 2.1.13 
flex-tool-bar 0.12.0 
fold-lines 0.2.2 
folded-code-preview 0.2.4 
grammar-tab-colors 0.2.8 
hyperclick 0.1.5 
hyperlink-hyperclick 1.3.4 
incsearch 0.3.4 
js-hyperclick 1.11.1 
language-autohotkey 0.1.0 
minimap 4.29.7 
minimap-autohide 0.10.1 
minimap-autohider 1.5.3 
minimap-bookmarks 0.4.2 
minimap-codeglance 0.4.7 
minimap-cursorline 0.2.0 
minimap-hide 0.3.0 
nav-panel-plus 0.3.2 
pigments 0.40.2 
remember-folds 0.3.0 
scroll-color 0.3.0 
Sublime-Style-Column-Selection 1.7.4 
sym-send 0.0.2 
sync-settings 0.8.3 
tool-bar 1.1.0 
tool-bar-atom 1.7.0 
tree-view-search-bar 1.0.0 
Tecnology73 commented 7 years ago

I can't really debug an issue when I don't know the steps you took leading up to the error...

Did you have a file open? Was it upon launching Atom? Hovering over the collapse element?

rocketinventor commented 6 years ago

It seems that it might be an issue with a change in editor setting. I got the same error on a fresh install of Atom that I just set up.

Steps to reproduce:

  1. Open HTML or JS file
  2. Fold a line of code
  3. Hover over folded code (works ok)
  4. Enable "Soft Wrap"
  5. Repeat Step 3 (throws error now)

Also works when toggling any other "Editor" setting (soft tabs, soft wrap, show line numbers, etc.) or even installing plugins while the file is open. Temporarily switching to another file in the pane "fixes" it (until next toggle).

Atom: 1.25.1 ia32 Electron: 1.7.11 OS: Microsoft Windows 10 Home Thrown From: folded-code-preview package 0.2.5

Stack Trace

Uncaught TypeError: Cannot read property 'element' of undefined

At C:\Users\prime\Downloads\AtomPortable_1.25.1\Data\atom\packages\folded-code-preview\lib\folded-code-preview.js:50

TypeError: Cannot read property 'element' of undefined
    at /packages/folded-code-preview/lib/folded-code-preview.js:50:73)
    at HTMLSpanElement.handle (/packages/folded-code-preview/node_modules/jquery/dist/jquery.js:5536:29)
    at HTMLBodyElement.dispatch (/packages/folded-code-preview/node_modules/jquery/dist/jquery.js:5183:27)
    at HTMLBodyElement.elemData.handle (/packages/folded-code-preview/node_modules/jquery/dist/jquery.js:4991:28)

Commands

  4x -5:34.7.0 core:move-left (input.hidden-input)
     -5:19.5.0 core:backspace (input.hidden-input)
  4x -5:12.3.0 editor:newline (input.hidden-input)
     -5:06.8.0 core:backspace (input.hidden-input)
  3x -5:06.0 core:delete (input.hidden-input)
     -4:49.7.0 editor:toggle-soft-wrap (input.hidden-input)
     -4:22.6.0 core:move-left (input.hidden-input)
 16x -4:22.2.0 editor:newline (input.hidden-input)
 22x -4:14.7.0 core:backspace (input.hidden-input)
     -4:13.2.0 core:delete (input.hidden-input)
     -4:03.9.0 editor:newline (input.hidden-input)
     -3:49.1.0 editor:toggle-soft-wrap (input.hidden-input)
     -3:40.1.0 editor:newline (input.hidden-input)
     -3:39.5.0 core:move-up (input.hidden-input)
     -3:35.2.0 editor:newline (input.hidden-input)
     -3:06.9.0 editor:toggle-soft-wrap (input.hidden-input)

Non-Core Packages

folded-code-preview 0.2.5