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

Bug 432953

Summary: Content assist on empty HTML file throws error, echoes keystrokes multiple times
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: EditorAssignee: Project Inbox <orion.editor-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: elijahe, Michael_Rennie, Mike_Wilson
Version: 5.0   
Target Milestone: 5.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
screenshot none

Description Mark Macdonald CLA 2014-04-16 13:47:53 EDT
Created attachment 242065 [details]
screenshot

1. Create a new file named foo.html, open it in the editor
2. Type '<p'

Immediately a JS error is logged from contentAssist.js:

> Uncaught TypeError: Cannot read property 'forEach' of undefined contentAssist.js:378
> ContentAssist.filterProposals contentAssist.js:378
(anonymous function) contentAssist.js:122
> EventTarget._dispatchEvent eventTarget.js:76
> EventTarget.dispatchEvent eventTarget.js:62
> TextView.onSelection textView.js:2422
> TextView._setSelection textView.js:6309
> TextView._modifyContent textView.js:5858
...

Additional errors appear to be generated by one of the content assist plugins:
> Error retrieving content assist proposals contentAssist.js:286
> Error: plugin activation error
>    at http://localhost:8080/orion/pluginregistry.js:663:44

From this point onward, every keystroke you type is echoed multiple times in the editor, making it unusable. You have to reload hte page to fix it.
Comment 1 Elijah El-Haddad CLA 2014-04-17 12:41:29 EDT
pushed the following change to eclipse.org:
- Prevent race condition during addition of listeners for content assist proposal filtering.
- Do not add listeners for filtering if no proposals were returned by the content assist providers
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b10319ae74886b3776717a3ca61437850f6c3a1e
Comment 2 Michael Rennie CLA 2014-12-17 10:09:36 EST
I cannot reproduce the failures in 8.0, using the steps (and any other assist in HTML) works as expected.

Marking fixed.