Uncaught TypeError: Cannot read property 'NaN' of undefined (right-click)
- 主要語言
- CoffeeScript
- 星號
- 518
- 分支
- 70
- PR 合併指標
- 30 天內沒有已合併 PR
描述
[Enter steps to reproduce:]
1. ...
2. ...
**Atom**: 1.23.3 x64
**Electron**: 1.6.15
**OS**: Microsoft Windows 10 Education
**Thrown From**: [pigments](https://github.com/abe33/atom-pigments) package 0.40.2
### Stack Trace
Uncaught TypeError: Cannot read property 'NaN' of undefined
```
At C:\Users\jacek\AppData\Local\atom\app-1.23.3\resources\app\src\text-editor-component.js:959
TypeError: Cannot read property 'NaN' of undefined
at TextEditorComponent.renderedScreenLineForRow (~/AppData/Local/atom/app-1.23.3/resources/app/src/text-editor-component.js:959:37)
at TextEditorComponent.screenPositionForPixelPosition (~/AppData/Local/atom/app-1.23.3/resources/app/src/text-editor-component.js:2398:33)
at HTMLElement.screenPositionForPixelPosition (/app.asar/src/text-editor-element.js:247:32)
at HTMLElement.ColorBufferElement.screenPositionForMouseEvent (/packages/pigments/lib/color-buffer-element.coffee:429:22)
at HTMLElement.ColorBufferElement.colorMarkerForMouseEvent (/packages/pigments/lib/color-buffer-element.coffee:415:17)
at Object.colorMarkerForMouseEvent (/packages/pigments/lib/pigments.coffee:221:25)
at Object.shouldDisplayContextMenu (/packages/pigments/lib/pigments.coffee:215:5)
at /packages/pigments/lib/pigments.coffee:111:36)
at ContextMenuManager.module.exports.ContextMenuManager.cloneItemForEvent (~/AppData/Local/atom/app-1.23.3/resources/app/src/context-menu-manager.js:167:25)
at ContextMenuManager.module.exports.ContextMenuManager.templateForEvent (~/AppData/Local/atom/app-1.23.3/resources/app/src/context-menu-manager.js:100:39)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (~/AppData/Local/atom/app-1.23.3/resources/app/src/context-menu-manager.js:189:33)
at WindowEventHandler.handleDocumentContextmenu (~/AppData/Local/atom/app-1.23.3/resources/app/src/window-event-handler.js:251:44)
```
### Commands
```
```
### Non-Core Packages
```
atom-beautify 0.30.9
atom-material-syntax 1.0.8
atom-material-ui 2.1.1
open-in-browser 0.5.2
pigments 0.40.2
```
貢獻指南
研究方向
錯誤發生在 pigments 套件的 color-buffer-element.coffee 第 429 行,在 screenPositionForMouseEvent 方法中。首先檢查該檔案,以及相關的 pigments.coffee 檔案中第 221 行附近的內容。此問題會在按一下滑鼠右鍵時觸發,因此請查看內容功能表處理。檢查是否已有針對滑鼠事件的測試,並執行這些測試以確認它們是否失敗。修正可能涉及在存取屬性之前確保像素位置有效。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- coffeescript, javascript
- 領域
- desktop, devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100