search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Problem with TimeRangeDoubleClickJavaScript in Chrome Browser

Asked by JMP
11 years ago.

Hello,

Regression problem.

In DayPilot 6 (6.7.2431), the following code works fine in Chrome Browser:

<daypilot:daypilotcalendar id="DPC" .....
TimeRangeDoubleClickHandling="JavaScript" TimeRangeDoubleClickJavaScript="alert('TimeRangeDoubleClick')">
</daypilot:daypilotcalendar>

When I doubleclick an empty cell, then JavaScript alert is fired.

In DayPilot 7 (7.3.2861), this code doesn't work anymore in Chrome (OK on Internet Explorer).
The TimeRangeSelectedJavaScript still works in Chrome but not the TimeRangeDoubleClickJavaScript.

Any idea ?

Regards

Comment posted by Dan Letecky [DayPilot]
11 years ago.

Please let me check it. I will get back to you soon.

Answer posted by Dan Letecky [DayPilot]
11 years ago.

This should be fixed now in build 2866.

You can download it in the sandbox:

http://www.daypilot.org/sandbox/

Comment posted by JMP
11 years ago.

Just tried with the 7.3 SP4 release (build 2871 in memory)
Sorry but the problem is still there! (only with Chrome Browsers).

Comment posted by Dan Letecky [DayPilot]
11 years ago.

I'm not able to reproduce it anymore with 2871.

I'm doing this:

1. At http://www.daypilot.org/demo/Calendar/
2. If I select a time range, it will display an alert with the time range selected
3. If I double-click this active range, it creates a new event
4. If I double-click a background cell that is not in the selected range, it will create a new event as well.

Are you able to reproduce it in the demo?

Comment posted by JMP
11 years ago.

Mmmm...
point 3 and 4 in your list: depend how you catch then events on the demo. Server side (CallBack/PostBack) or client side with Javascript ?

if I put the following code on my server, the javascript code is only fired with doubleclick in IE but not in Chrome:

<daypilot:daypilotcalendar id="DPC" .....
TimeRangeDoubleClickHandling="JavaScript" TimeRangeDoubleClickJavaScript="alert('TimeRangeDoubleClick')">
</daypilot:daypilotcalendar>

I need this to do some client process with start.toStringSortable() before making an AJAX call and opennig a new popup.

Comment posted by Dan Letecky [DayPilot]
11 years ago.

The demo uses the following code:

TimeRangeSelectedHandling="JavaScript" 
TimeRangeSelectedJavaScript="alert(start.toStringSortable() + '-' + end.toStringSortable())"
TimeRangeDoubleClickHandling="CallBack"        
OnTimeRangeDoubleClick="DayPilotCalendar1_TimeRangeDoubleClick"

If I switch it to your example it works as well:

TimeRangeDoubleClickHandling="JavaScript"
TimeRangeDoubleClickJavaScript="alert('TimeRangeDoubleClick')"

Very strange, because it was indeed not working 7.3.2861 but since 2866 DayPilot includes a lot of new code to make it working reliably.

Can you please check that it is indeed using 7.3.2871 by checking the page HTML output? It should include a line like this:

/* DayPilotPro: DayPilot, Version=7.3.2871.0, Culture=neutral, PublicKeyToken=426941954f05e7fe */

Sometimes the old version gets cached somewhere....

Comment posted by JMP
11 years ago.

I made an IISReset, same problem.
+ reboot the server and checked the HTML source code and got the "/* DayPilotPro: DayPilot, Version=7.3.2871.0, Culture=neutral, PublicKeyToken=426941954f05e7fe */" line.

But the javascript still doesn't fire with chrome (Version 26.0.1410.64 m which is the last one).
The strange thing is that everything's working fine if I access with the same chrome browser our production server which is using Daypilot 6.7.2431.

Not at work tomorow but I will try again on thursday changing the other properties (AfterRenderJavaScript...) and/or with your code.
Maybe the problem appears only in a specific case.

Regards.

Comment posted by Dan Letecky [DayPilot]
11 years ago.

Thanks for the update. I'm using the same Chrome version. If you were able to reproduce the issue by modifying the Demo source code it would help a lot.

Comment posted by JMP
11 years ago.

OK, I found the problem!

Just add Crosshair="Full" and the TimeRangeDoubleClickJavaScript doesn't fire anymore in Chrome!
Works with "Disabled"/"Header".

Thank you to tell me when it's fixed.
Crosshair is just an extra (cool) feature so not in a hurry. :-)

Regards.

Comment posted by Dan Letecky [DayPilot]
11 years ago.

Great, thanks for the update. I'll take a look at it.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.