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

Bug 418365

Summary: Editor page: Right pane keeps "find next" when left pane has selection changed.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon, Silenio_Quarti
Version: 3.0   
Target Milestone: 4.0 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2013-09-30 12:10:06 EDT
I found this strange behavior when I was working on the search result page.
1.In the search page search for something.
2.In result pane click on any file of the results.
3.In the editor page, the find bar is opened with that keyword.
4.Then just change the selection on the left pane(do not click on any item.)
5.The selection change does not change the page URL, which is correct. But it keeps finding next while selection is changing and the left pane can never get focus.
Comment 1 Silenio Quarti CLA 2013-09-30 14:16:40 EDT
fileCommands.js is causing this (see stack):

fileCommandUtils.updateNavTools (fileCommands.js:153)
objects.mixin.updateCommands (mini-nav.js:286)
(anonymous function) (mini-nav.js:73)
(anonymous function) (EventTarget.js:43)
EventTarget.dispatchEvent (EventTarget.js:40)
Selection.setSelections (selection.js:85)
exports.ExplorerNavHandler.ExplorerNavHandler.setSelection (explorerNavHandler.js:260)
exports.ExplorerNavHandler.ExplorerNavHandler.onClick (explorerNavHandler.js:527)
(anonymous function) (explorer.js:749)
Comment 2 Silenio Quarti CLA 2013-09-30 16:18:50 EDT
commandRegistry.processURL() should only run when the page hash changes and when the page first loads. FileCommands.updateNavTools runs on "selectionChange" events, it should not be calling processURL. Most pages already call processURL in the right places, but table.html did not. 

Fixed

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bb5452ff59fab56c121da747e547a0b835fe4369

There is still a call to processURL in globalCommands.js that might be unnecessary  since it is running too early (before the editor and nav input is set). I will open a separate bug to investigate that.
Comment 3 Silenio Quarti CLA 2013-09-30 19:00:35 EDT
Closed to quickly. After these changes the find slide out does not show after step 2 because fileCommands.js is closing it.
Comment 4 Silenio Quarti CLA 2013-09-30 19:04:14 EDT
Problem in comment#3 is the same as bug#377777.
Comment 5 Silenio Quarti CLA 2013-09-30 19:13:48 EDT
Added a band-aid fix for problem above. I believe that fileCommands.js should not be closing the slide out of the right pane.  It should close the slide out for the given toolbarId or selectionToolbarId only.  I will use bug#37777 for the remaining work.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d7b7f292dde844dac16ca1eec2838e9d2372f559