Open GoogleCodeExporter opened 9 years ago
I'm sorry, before step 2) you must add addTimeBlockClickHandler first to the
calendar
Original comment by jaka.ram...@gmail.com
on 4 Oct 2011 at 4:03
Unfortunately, I don't think the fix works completely. See the attached
screenshot.
Steps:
1) Set calendar size so that the height exceeds the browser window so that the
vertical scrollbar is visible.
2) Without performing any other activities, once the calendar is loaded, click
a cell. It returns the correct date. It also scrolls to the bottom of the
screen.
3) Move the mouse to another date, click on it, and the incorrect date is
returned. The date returned is the one I would get if I simply moved the mouse
thumbwheel two clicks up.
Regards, -Dwight
Original comment by dwight.l...@gmail.com
on 21 Jan 2012 at 2:43
Attachments:
Even more unfortunately, this was a case where I wrapped myself around the
axles. This issue come up in a split browser window like you see w/ firebug.
If you detach the firebug console - it all works fine (well, w/ your fix).
-Dwight
Original comment by dwight.l...@gmail.com
on 21 Jan 2012 at 3:03
Appears similar to http://code.google.com/p/gwt-cal/issues/detail?id=144
(DayView instead MonthView).
Original comment by dom....@gmail.com
on 8 Sep 2012 at 6:22
For sure seems similar, but I cannot replicate either.
Any help replicating the problem is welcome
Original comment by ctasada
on 15 Sep 2012 at 10:10
[deleted comment]
Hi ,
I fixed this problem simply by adding Window.getScrollTop() and
Window.getScrollLeft() for x and y calculation..
I just changed the dayclicked method on MonthView.java :
private void dayClicked(Event event) {
int y = event.getClientY() + Window.getScrollTop() - DOM.getAbsoluteTop(appointmentCanvas.getElement());
int x = event.getClientX() + Window.getScrollLeft() - DOM.getAbsoluteLeft(appointmentCanvas.getElement());
int row = (int) Math.floor(y / (appointmentCanvas.getOffsetHeight() / monthViewRequiredRows));
int col = (int) Math.floor(x / (appointmentCanvas.getOffsetWidth() / DAYS_IN_A_WEEK));
calendarWidget.fireTimeBlockClickEvent(
cellDate(row * DAYS_IN_A_WEEK + col));
Original comment by mohieddi...@gmail.com
on 1 Oct 2012 at 8:50
Attachments:
But i have a problem only with Firefox browser (works fine with chrome and
other browser... ), when i scroll to the bottom of the screen and click on a
day it automatically scrolls to the top of the screen...
any idea how to fix this?
Original comment by mohieddi...@gmail.com
on 1 Oct 2012 at 8:56
Hi ,
I found it , the problem with firefox scrolling mode in monthView is caused by
the FocusPanel in the InteractiveWidget.java, it seem when a cell is clicked
the screen scrolls depending to the FocusPanel location...
I solved it by fixing the FocusPanel Height.
/**
* Makes the widget's focus panel invisible.
*/
private void hideFocusPanel() {
RootPanel.get().add(focusPanel);
DOM.setStyleAttribute(focusPanel.getElement(), "position", "absolute");
DOM.setStyleAttribute(focusPanel.getElement(), "top", "-10");
DOM.setStyleAttribute(focusPanel.getElement(), "left", "-10");
// fix scroll mode problems
DOM.setStyleAttribute(focusPanel.getElement(), "height", "900px");
DOM.setStyleAttribute(focusPanel.getElement(), "width", "0px");
}
Tested on firefox and chrome
Original comment by mohieddi...@gmail.com
on 3 Oct 2012 at 8:51
To replicate was needed to remove the autosizing from the get-cal-demo code and
increase the calendar's height
Fixed in r431
Pending to fix the focus problem. I need to check if changing the panel's
height is the best solution.
Original comment by ctasada
on 10 Oct 2012 at 10:36
Hi,
The previous solution regarding the focus problem has a problem. When the
focusPanel receives the focus it's visible, also doesn't solve the problem when
the panel height is bigger than 1500px or when there's an horizontal scroll.
The next solution seems better
private void hideFocusPanel() {
focusPanel.setVisible(false);
RootPanel.get().add(focusPanel);
DOM.setStyleAttribute(focusPanel.getElement(), "position", "absolute");
DOM.setStyleAttribute(focusPanel.getElement(), "top", "0");
DOM.setStyleAttribute(focusPanel.getElement(), "left", "0");
DOM.setStyleAttribute(focusPanel.getElement(), "height", "100%");
DOM.setStyleAttribute(focusPanel.getElement(), "width", "100%");
}
Any comments before committing it?
Original comment by ctasada
on 15 Oct 2012 at 8:10
Done in rev 433
Original comment by ctasada
on 21 Oct 2012 at 4:51
I just realized that this fix is breaking the keyevent handling, so I'm
reverting it until I find a proper fix, sorry.
Original comment by ctasada
on 15 Nov 2012 at 9:37
Solved the problem with vertical scroll in rev 437
Horizontal scroll needs some kind of different solution. Suggestions are
welcome ;)
Original comment by ctasada
on 19 Dec 2012 at 10:19
Original issue reported on code.google.com by
jaka.ram...@gmail.com
on 4 Oct 2011 at 4:00Attachments: