Search and Top Navigation
#5463 closed bug (worksforme)
Opened March 31, 2010 06:16PM UTC
Closed January 11, 2011 04:01PM UTC
Last modified October 11, 2012 09:15PM UTC
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: |
Description
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."
Attachments (0)
Change History (3)
Changed January 05, 2011 02:50PM UTC by comment:1
Changed January 11, 2011 04:01PM UTC by comment:2
| resolution: | → worksforme |
|---|---|
| status: | new → closed |
Confirmed working with urkle's test, even tested with jQuery 1.4 and jQuery UI 1.8 and it worked.
Changed October 11, 2012 09:15PM UTC by comment:3
| milestone: | TBD |
|---|
Milestone TBD deleted
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.
http://jsfiddle.net/urkle/upsMC/
And it works fine with defined events on the constructor as well as bound events.