Changing middle mouse behavior in Adobe AIR HTML Control?

Posted by Qz on Stack Overflow See other posts from Stack Overflow or by Qz
Published on 2010-04-19T04:50:14Z Indexed on 2010/04/19 4:53 UTC
Read the original article Hit count: 243

I'm using the Flex 4/Adobe AIR mx:HTML control in a project and I'm trying to figure out how to change the middle mouse behavior. For some reason the control treats middle mouse clicks and drags exactly the same as left mouse clicks and drags, navigating through links and selecting text -- everything.

For my project I need to use the middle mouse button for a different function. I've figured out how to hook into the events (although mouseUp and mouseDown for Left/Middle don't work over HTML whitespace, perhaps because of the default behavior). However I can't figure out how to stop the default behavior for middle mouse events. Calling preventDefault() on the HTML control mouse events doesn't work, presumably because the behavior is handled by the HTMLLoader within the HTML control, which I imagine hooks mouse events to the actual HTML content displayed on screen. Unfortunately I can't view the source for HTMLLoader to figure out what's going on, and browsing the properties and events doesn't shed any light on the situation either.

Any help would be greatly appreciated!

Oh, if anyone can suggest a different embeddable HTML renderer that doesn't have this problem, then that might work too, I'm not too tied to WebKit (although I do need to use AIR)

© Stack Overflow or respective owner

Related posts about adobe-air

Related posts about flex