Chrome Version: ToT
FileTableList (or FileGrid) and MainWindowComponent classes are both registering event listener for the file list.
When doing a double-click (or a tap) to open a file, the mouse/touch events goes to the file list view element and those 2 handlers are invoked in order.
The first handler registered by FileTableList rewrites the selection status of the Selection Model, and then the other handler set by MainWindowComponent will read that Selection to launch the file.
This mechanism is dependent on the order of execution, which is determined by the order which the two handlers are added at initialization procedure. So it is error-prone.
It'd be better for maintainability to have a single event handler that handles mouse/touch events pass a message (in the form of a custom event, for example) to MainWindowComponent, so that it'll make the flow of the data more explicit.
Comment 1 by yamaguchi@chromium.org
, Aug 10 2017