Loading...

jquery-ui@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[jquery-ui] Datepicker under 1.7.2 triggers the mouseover event when .datepicker called, is this desired? reyz Mon Sep 28 19:00:12 2009

I just upgraded from 1.6.1 to 1.7.2 and suddenly had a bunch of very
strange behaviors appear that I finally traced to the initialization
of some datepickers on the page.  Apparently when datepickers are
initialized, they seem to fire the mouseover event on one of the leaf
<a> nodes (the individual day links).  Wrapper containers around the
datepicker hear this mouseover event, which at least in my app causes
some problems.  I can work around it, but is this desired behavior?
Or am I triggering this in some other way?  If this is indeed firing a
mouseover, why would we want the mouseover event automatically fired
in this case?  Seems like a dangerous practice.

I've managed to isolate a test case as follows:

js:

$(function(){
        // bind a listener to check if the wrapper element hears the
mouseover
        $('#wrapper').bind('mouseover', function(){
                console.log('mouseover called');
        })

        //initialize a datepicker
        $('#testDatepicker').datepicker();
});

html:
<div id="wrapper">
        <div id="testDatepicker"></div>
</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---