Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 461234

Summary: Exception opening content assist
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public
Version: 8.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2015-03-02 14:31:01 EST
Steps:

1. open a file (I used JS)
2. while it is loading and linting activate content assist (thats the time when I saw the exception
3. check the log

Uncaught TypeError: Cannot read property 'classList' of undefinedcontentAssist.js:1250 ContentAssistWidget.selectNodecontentAssist.js:940 objects.mixin.selectNewcontentAssist.js:875 objects.mixin.lineDowncontentAssist.js:796 (anonymous function)textView.js:2438 TextView.invokeActiontextView.js:4705 TextView._doActiontextView.js:3736 TextView._handleKeyDowntextView.js:6257 handlers.push.handler

The line highlighted as the problem in the inspector is:

if (-1 !== nodeIndex) {
 node = this.parentNode.childNodes[nodeIndex];
 node.classList.add(STYLES.selected); <- this one
Comment 1 Curtis Windatt CLA 2015-03-03 15:49:51 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d2b227fdfa6c6645f1cf5384706291aca58e1099
Fixed in master

Added a check that the actual html node exists before we perform operations on it.  Similar code used to scroll the node into view.