Posts Tagged zoom

Stopp Internet Explorer’s CTRL – MouseWheel

As a Flex developer I come in contact with all sorts of problems when I run my applications in Internet Explorer 7. One of the most annoying ones is the one where CTRL – MouseWheel will resize the Flex application area itself, even when the application is scaled to 100% * 100% of your browser window and has focus. This is impossible to accept and here is the solution to the problem.

Assuming that you’re working with Flex Builder, all you have to do is edit the index.template.html file a little bit. Such that it contains the following JavaScript.

function catchCtrlMouseWheel()
{
    if (window.event.type == "mousewheel" ) 
    {
        if (window.event && window.event.wheelDelta ) 
        {
            return window.event.ctrlKey ? false : true;
        }
    }
 
    return true;
}

And in the <body>-tag:

<body onmousewheel="return catchCtrlMouseWheel()">

, , ,

No Comments