PDA

View Full Version : Opera mousewheel delta


fabrizim
04-20-2007, 09:38 AM
Correct me if I'm wrong, but I think that the delta value returned by a mousewheel event in Opera is the opposite of what is returned in most other browsers.

Eg., when using the mousewheel on a grid, you must mousewheel up to scroll down. I'm not sure how many other places this happens, but for that specific example, I think the code should be changed.

Example code for the handleWheel function in GridView.js


handleWheel : function(e){
var d = e.getWheelDelta();
this.scroller.dom.scrollTop -= (Ext.isOpera ? -1 : 1) * d*22;
// set this here to prevent jumpy scrolling on large tables
this.lockedBody.dom.scrollTop = this.mainBody.dom.scrollTop = this.scroller.dom.scrollTop;
e.stopEvent();
},


I think the same type of code would have to be implemented wherever the mousewheel is handled.

Regards-
Mark

KimH
04-21-2007, 05:46 AM
Eg., when using the mousewheel on a grid, you must mousewheel up to scroll down.

When I mousewheel up then the grid goes up as well, and when I mousewheel down the grod goes down :-?

jack.slocum
04-21-2007, 07:35 AM
This is handled automatically by getWheelDelta (look in EventManager.js).