Hi everyone,

I discovered a bug in 2.2.0-beta which we did not experience with 2.1.3:
Clicking outside of a list view item in a ListView (e.g. below the last item) results in a mouse click event with the index -1, which does not get handled correctly by the ListViewSelectionModel:

Code:
ArrayList<E>.get(int) line: 324    
CompositeElement.getElement(int) line: 128    
ListView<M>.focusItem(int) line: 601    
ListViewSelectionModel<M>.handleMouseDown(ListViewEvent<M>) line: 144    
ListViewSelectionModel<M>.handleEvent(ListViewEvent<M>) line: 85    
ListViewSelectionModel<M>.handleEvent(BaseEvent) line: 1    
BaseObservable.callListener(Listener<BaseEvent>, BaseEvent) line: 178    
BaseObservable.fireEvent(EventType, BaseEvent) line: 86    
ListView<M>(Component).fireEvent(EventType, ComponentEvent) line: 454    
ListView<M>(Component).onBrowserEvent(Event) line: 866    
DOM.dispatchEventImpl(Event, Element, EventListener) line: 1307    
DOM.dispatchEvent(Event, Element, EventListener) line: 1263    
GeneratedMethodAccessor155.invoke(Object, Object[]) line: not available    
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25    
Method.invoke(Object, Object...) line: 597    
MethodAdaptor.invoke(Object, Object...) line: 103    
MethodDispatch.invoke(JsValue, JsValue[], JsValue) line: 71    
OophmSessionHandler.invoke(BrowserChannel, BrowserChannel$Value, int, BrowserChannel$Value[]) line: 157    
BrowserChannelServer(BrowserChannel).reactToMessagesWhileWaitingForReturn(BrowserChannel$SessionHandler) line: 1714    
BrowserChannelServer.invokeJavascript(CompilingClassLoader, JsValueOOPHM, String, JsValueOOPHM[], JsValueOOPHM) line: 165    
ModuleSpaceOOPHM.doInvoke(String, Object, Class<?>[], Object[]) line: 120
I noticed in the SVN log that some prior checks to
Code:
e.getIndex == -1
were removed in later versions, maybe this is the reason?

regards