brOOper / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 0 forks source link

MouseOverHandler gets notified only onced #112

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When adding a MouseOverHandler in order to display a popup with the details of 
the appointment (as showed in the example here: 
http://code.google.com/p/gwt-cal/wiki/HandlingEvents), it is supposed to show 
the popup every time the user cursor is over an appointment.

The problem is that it only does it the first time the mouse is over the 
appointment, and not the following times.

I found the problem, it is caused by the line 472 in 
com.bradrydzewski.gwt.calendar.client.CalendarWidget.java:

!appointment.equals(appointmentManager.getHoveredAppointment())

The logic here is that the popup is only displayed when the appointment hovered 
is different from the last hovered, BUT if the user only has one appointment it 
is always the same one... So the mouse over handler listener gets called only 
once.

I hope I'm being clear enough. In any case feel free to contact me at 
darchitect@gmail.com

Regards,

PS. Thanks for this great component.
PS2. My current work around is to add this line at the end of the onMouseOver 
method of the MouseOverHandler implementation:
calendar.fireMouseOverEvent(new Appointment(), null);

Original issue reported on code.google.com by darchit...@gmail.com on 1 Mar 2011 at 5:37