| Summary: | Error when navigating through browser history | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | eclipse.felipe, john.arthorne, Silenio_Quarti |
| Version: | 0.2 | ||
| Target Milestone: | 0.3 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
*** Bug 357389 has been marked as a duplicate of this bug. *** Marking as candidate for 0.3. This quickly becomes annoying, although it is slightly better when you realize refreshing the page will fix it. When you navigate to another file, the new file is loaded and used to populate the editor, like this: - Editor calls textView.setModel(new TextModel(...)) - Editor calls textView.setText(new file contents) - TextView dispatches a ModelChangedEvent - TextView dispatches a SelectionEvent In the case where the caret position before you loaded the new file was >= 1, the SelectionEvent will contain a Selection that is out of range. This causes the TypeError later on when the styler tries to get the selected text. sounds like a bug for Silenio and I. I believe this is fixed in the latest. We changed how the text is set in the editor. There is no need to change the model anymore. Mark please try the latest. Fixed, thanks |
Chrome 14 Orion 08/17 1. Open the editor on a file. 2. Open another file in the same tab (eg. by using Ctrl+Shift+R). 3. Click on the editor to give it focus. 4. Click Back in the browser. 5. I see an error: TypeError at textModel.js:284 type: "non_object_property_call" arguments: Array[2] 0: "substring" 1: undefined length: 2 5. The error causes the editor to become dirty, and the undo stack goes haywire. You have to reload the page to fix it.