Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
Opened this issue · 6 comments
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.17.2 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: atom-js-console package 1.2.2
Stack Trace
Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
At /Users/machii/.atom/packages/atom-js-console/lib/main.js:36
TypeError: Cannot read property 'getSelectedText' of undefined
at Object.run (/packages/atom-js-console/lib/main.js:36:62)
at /packages/atom-js-console/lib/main.js:19:39)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:1)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:1)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:1)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1300:1)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:334:1)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
Commands
-5:44.7.0 js-console:toggle (atom-pane.pane.active)
-4:24.8.0 core:confirm (input.hidden-input)
-0:02.3.0 js-console:toggle (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
Non-Core Packages
atom-js-console 1.2.2
language-textile 0.2.0
platformio-ide-terminal 2.5.1
script 3.15.0
terminal-plus 0.14.5
textile-preview 0.1.2
I have the same issue, on linux.
It seems to have something to do with the tab I click not being focussed.
It happened once then the second time it didn't so I tried a few things.
It seems to occur when I have two panes open, one is in settings, and my mouse is focussed there, and before focussing the file, in another pane, I click right mouse button in the other file then it throws this error.
If I go the file first it doesn't.
I have the same issue, when i wrote document.write()
[Enter steps to reproduce:]
- Install package
- Run Atom
Atom: 1.25.1 x64
Electron: 1.8.4
OS: "Manjaro Linux"
Thrown From: atom-js-console package 1.2.2
Stack Trace
Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
At /home/beast/.atom/packages/atom-js-console/lib/main.js:36
TypeError: Cannot read property 'getSelectedText' of undefined
at Object.run (/packages/atom-js-console/lib/main.js:36:62)
at HTMLElement.jsConsoleToggle (/packages/atom-js-console/lib/main.js:19:39)
at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:384:43)
at CommandRegistry.dispatch (/usr/lib/atom/src/command-registry.js:273:17)
at AtomEnvironment.dispatchApplicationMenuCommand (/usr/lib/atom/src/atom-environment.js:1329:19)
at EventEmitter.outerCallback (/usr/lib/atom/src/application-delegate.js:326:47)
at emitThree (events.js:135:13)
at EventEmitter.emit (events.js:216:7)
Commands
2x -1:06.5.0 core:close (atom-pane.pane.active)
-0:56.1.0 js-console:toggle (atom-pane.pane.active)
Non-Core Packages
atom-js-console 1.2.2
atom-live-server 2.2.0
graphql-autocomplete 1.1.1
language-graphql 0.9.0
platformio-ide-terminal 2.8.1
scroll-searcher 5.2.0
teletype 0.12.1
bump
[Enter steps to reproduce:]
- Install
- Atom run
Atom: 1.41.0 x64
Electron: 4.2.7
OS: Mac OS X 10.15.1
Thrown From: atom-js-console package 1.2.2
Stack Trace
Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
At /Users/masajiro/.atom/packages/atom-js-console/lib/main.js:36
TypeError: Cannot read property 'getSelectedText' of undefined
at Object.run (/packages/atom-js-console/lib/main.js:36:62)
at HTMLElement.jsConsoleToggle (/packages/atom-js-console/lib/main.js:19:39)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349392)
at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:347867)
at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:718772)
at EventEmitter.t (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:726695)
at EventEmitter.emit (events.js:182:13)
Commands
-8:06.3.0 atom-live-server:stopServer (div.tool-panel.tree-view)
-7:55.6.0 atom-live-server:startServer (div.tool-panel.tree-view)
-5:20.8.0 js-console:toggle (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
-4:52.3.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
-3:19 welcome:show (div.package-detail)
-0:55.2.0 js-console:toggle (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
-0:11.3.0 atom-live-server:stopServer (a.btn-issue.btn.btn-error)
-0:04.3.0 js-console:toggle (a.btn-issue.btn.btn-error)
Non-Core Packages
atom-js-console 1.2.2
atom-live-server 2.3.0
git-control 0.9.0
git-log 0.4.1
git-plus 8.7.1
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.48.0 x64
Electron: 5.0.13
OS: Windows 10 Pro 1909
Thrown From: atom-js-console package 1.2.2
Stack Trace
Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
At C:\Users\IO\.atom\packages\atom-js-console\lib\main.js:36
TypeError: Cannot read property 'getSelectedText' of undefined
at Object.run (/packages/atom-js-console/lib/main.js:36:62)
at HTMLElement.jsConsoleToggle (/packages/atom-js-console/lib/main.js:19:39)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:349786)
at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:11:348261)
at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:1:765573)
at EventEmitter.t (~/AppData/Local/atom/app-1.48.0/resources/app/static/<embedded>:1:773496)
at EventEmitter.emit (events.js:194:13)
Commands
-8:33 application:add-project-folder (ol.tree-view-root.full-menu.list-tree.has-collapsable-children.focusable-panel)
-3:42.3.0 js-console:toggle (textarea.xterm-helper-textarea)
Non-Core Packages
atom-js-console 1.2.2
atom-material-syntax 1.0.8
atom-material-ui 2.1.3
terminal-tab 0.6.0