Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#5463 closed bug (worksforme)

ev.originalEvent is undefined in slidechange

Reported by: elfuego Owned by:
Priority: major Milestone:
Component: ui.slider Version: 1.8
Keywords: events Cc:
Blocked by: Blocking:


The following code worked in jQuery 1.3 with ui 1.7.2 but is broke in 1.4 with ui 1.8:

$(("div.slider").bind('slidechange', function(ev, ui) {
    console.log(ev); // prints event
    console.log(ev.originalEvent);   // prints undefined
    if (ev.originalEvent.type == "mouseup") { 
        // do something here

Makes it difficult to check for mouseevents f.e. like is stated in the example with 'slidechange':

"Use event.orginalEvent to detect whether the value changed by mouse, keyboard, or programmatically."

Change History (3)

comment:1 Changed 12 years ago by urkle

in jQuery 1.8.5 though 1.8.7 this works as expected.. Or at least for the case where I have the events defined in the constructor object.

hmm.. Here is a test.

And it works fine with defined events on the constructor as well as bound events.

comment:2 Changed 12 years ago by Scott González

Resolution: worksforme
Status: newclosed

Confirmed working with urkle's test, even tested with jQuery 1.4 and jQuery UI 1.8 and it worked.

comment:3 Changed 11 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.