firefox+jquery mousewheel scroll event bug

前端 未结 4 1543
悲哀的现实
悲哀的现实 2020-12-15 05:04

UPDATE Working fix as suggested by David (see below):

replace

    $(\'.scrollMe\').bind(\"mousewheel DOMMouseScroll\", ...) 
         


        
4条回答
  •  生来不讨喜
    2020-12-15 05:18

    I can’t reproduce this bug in my FF 16.01 OSX using a touch pad (the Fiddle works fine), but I do know that there is another mozilla-specific event called MozMousePixelScroll. You might want to try to involve that as well.

    There is also more information avail at MDN: https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/DOMMouseScroll

    As a sidenote, I think stopping the default action using e.preventDefault() should be enough, no need to stop the propagations as well (unless there are other IE specific bugs).

提交回复
热议问题