t9md / atom-lazy-motion

Rapid cursor positioning with fuzzy search.
https://atom.io/packages/lazy-motion
MIT License
20 stars 3 forks source link

Uncaught TypeError: Cannot read property 'querySelector' of null #5

Closed reznik closed 8 years ago

reznik commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11 System: Mac OS X 10.10.3 Thrown From: lazy-motion package, v0.1.13

Stack Trace

Uncaught TypeError: Cannot read property 'querySelector' of null

At /Users/reznik/.atom/packages/lazy-motion/lib/hover-indicator.coffee:79

TypeError: Cannot read property 'querySelector' of null
  at lazy-motion-hover-container.Container.initialize (/Users/reznik/.atom/packages/lazy-motion/lib/hover-indicator.coffee:45:39)
  at lazy-motion-ui.UI.showCounter (/Users/reznik/.atom/packages/lazy-motion/lib/ui.coffee:60:47)
  at lazy-motion-ui.UI.focus (/Users/reznik/.atom/packages/lazy-motion/lib/ui.coffee:78:6)
  at Object.module.exports.start (/Users/reznik/.atom/packages/lazy-motion/lib/main.coffee:43:10)
  at atom-text-editor.subscriptions.add.atom.commands.add.lazy-motion:forward (/Users/reznik/.atom/packages/lazy-motion/lib/main.coffee:21:47)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -1:48.3.0 emmet:toggle-comment (atom-text-editor.editor.is-focused)
     -1:48.3.0 editor:toggle-line-comments (atom-text-editor.editor.is-focused)
     -1:47.7.0 core:save (atom-text-editor.editor.is-focused)
  2x -1:38.2.0 blur (atom-text-editor.editor.is-focused)
     -0:19.5.0 core:close (atom-text-editor.editor.is-focused)
     -0:19.4.0 blur (atom-text-editor.editor.is-focused)
     -0:18.3.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
  2x -0:18.2.0 blur (atom-text-editor.editor.is-focused)
     -0:15.4.0 core:move-down (input.hidden-input)
     -0:15.1.0 core:confirm (input.hidden-input)
  8x -0:15.1.0 blur (input.hidden-input)
     -0:13.2.0 lazy-motion:forward (input.hidden-input)
  5x -0:13.2.0 blur (input.hidden-input)
     -0:02.4.0 click (div.close.icon.icon-x)
     -0:01.3.0 lazy-motion:forward (input.hidden-input)
  2x -0:01.3.0 blur (input.hidden-input)

Config

{
  "core": {
    "audioBeep": false,
    "disabledPackages": [
      "wrap-guide",
      "symbols-view",
      "autocomplete-css"
    ]
  },
  "lazy-motion": {}
}

Installed Packages

# User
atom-minify, v0.4.1
autocomplete-sass, v0.1.0
django-templates, v0.5.0
emmet, v2.3.12
file-icons, v1.6.9
language-svg, v0.9.0
lazy-motion, v0.1.13
minimap, v4.13.2
minimap-autohide, v0.10.1
minimap-bookmarks, v0.1.0
pigments, v0.13.2
tabs-to-spaces, v0.11.1

# Dev
No dev packages
t9md commented 9 years ago

I can't reproduce issue you reported, how to reproduce this? Once you provided procedure to reproduce, I think I can fix.

reznik commented 9 years ago

Disable "Use Shadow DOM" in Atom prefs —> then restart app —> call out plugin —> error. With enabled "Use Shadow DOM" everything is OK. So maybe it's not actual "error", but just this package requires Shadow DOM enabled to work.

t9md commented 9 years ago

OK, thanks for clarification, I've never used atom with Shadow DOM disabled, when I started using Atom for 3 months ago, shadow DOM was enabled by default as far as I remember.

Is there any reason to disable shadow DOM?

reznik commented 9 years ago

I work with enabled DOM too :-) I just code html and sass and for me there's no reason to disable it. I've just found some lags in Atom on saving files, so played with settings and found this bug accidentally.

t9md commented 9 years ago

OK, thanks I feel this should be fixed ideally, but I have no motivation to investigate further for now. After you reported this issue, I checked several my other packages and revealed not worked with Shadow DOM disabled, but this report is first report for this issue of all my packages.

I want to fix it but postpone until I encounter critical issue stems on this issue.

But anyway thanks for reporting and clarification for reproduce procedure. This info is valuable for the people come after.

Thanks!!

reznik commented 9 years ago

👌🏻

t9md commented 8 years ago

Code is rewritten on v0.2.0 and fix minor bugs. Please open new issue if you see issue again.