| Summary: | Find toolbar broken after following search link | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Client | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Silenio_Quarti |
| Version: | 3.0 | ||
| Target Milestone: | 3.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
I believe this started happening when I moved the scrolling animation code from editor.js to textview.js. In editorCommands.js#244, the toolbar is only built if the scrolling callback is called, but that does not happen if the offset is already visible.
editor.moveSelection(offset, offset, function(){
self._localSearcher.buildToolBar(searchString, parsedParam.replaceWith);
self._localSearcher.findNext(true);
}, focus);
Hum, maybe this was broken already before my changes. It seems the previous code in Editor.moveSelection() did not call the callback either if the offset was already visible: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js?id=9e2eb7cba595f19fbdd4dee90d11facc92d8bf2c Changed the behavior of textView.setSelection() and textView.setCaretOffset() to call the callback even if no scrolling happens. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=eeb68977640f7292c5c424839531f9d9c75fed62 |