Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 408190 - Action selections are created every time a selection is changed in the sidebar in the editor view
Summary: Action selections are created every time a selection is changed in the sideba...
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 3.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Gabriel Luong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 23:36 EDT by Gabriel Luong CLA
Modified: 2013-05-16 09:48 EDT (History)
1 user (show)

See Also:
mamacdon: review+


Attachments
Illustrates the extra <ul> element added to the sidebar toolbar on selection (117.98 KB, image/png)
2013-05-15 23:36 EDT, Gabriel Luong CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Luong CLA 2013-05-15 23:36:31 EDT
Created attachment 231052 [details]
Illustrates the extra <ul> element added to the sidebar toolbar on selection

In the editor view, every time a selection is made on the sidebar, the selection event listener creates a new action selection, which appends 3 duplicate <ul> elements to the sidebarToolbarchildModes div.
Comment 1 Gabriel Luong CLA 2013-05-15 23:48:55 EDT
https://github.com/gabrielluong/orion.client/tree/Bug408190
Branch: Bug408190
commit d3f6425c99bf48a79998b62e5fb413b56db1c282
https://github.com/gabrielluong/orion.client/commit/d3f6425c99bf48a79998b62e5fb413b56db1c282

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Comment 2 Gabriel Luong CLA 2013-05-16 08:56:38 EDT
Just to be more clear on how to reproduce this bug

1. Open a file and get to the editor view
2. Put a breakpoint in mini-nav.js at: this.createActionSections() in updateCommands (Line 256)
3. Select a file in the sidebar.
4. Notice the 3 <ul> added to the sidebarToolbarchildModes div with each selection
5. Go back to 3 and repeat
Comment 3 Mark Macdonald CLA 2013-05-16 09:48:13 EDT
Thanks, good catch. Pushed 
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7249f06

FWIW I made a small change in a follow-up commit (b6edb37)