Closed tomasszabo closed 10 years ago
This will only work when you're using jQuery. The code as is works when not using jQuery, so I think we need a different solution that will work when using jQuery and when not.
maybe something like:
var eventObj = (event && event.originalEvent) || event || $window.event;
It's true, I have jQuery on my path. However, what you've proposed is working for me also. It'll be great to see this fix in next release.
fixed in 0.7.2
Mouse wheel scrolling was not working for me. The
wheel
function in scrollbar directive was fired but the delta was not computed correctly (i.e. it was 0, so the content was not moved to any direction). I've investigated the problem and it seems that theevent
object that is the input argument intowheel
function does not contain delta properties.I've changed following line
to
because the
originalEvent
property contains the original jQuery/jqLite event (which encapsulates the event from browser) and contains the delta properties. This solved my wheel scrolling problem (at least in newest Safari, Chrome and Firefox).Btw. in your code, sometimes you are referencing to
$window
and sometimes towindow
. Just a side note.