问题
We have a Silverlight control embedded in an html page. When I zoom the html page in FireFox 3.5 (ctrl - +) and then try to click on something in the Silverlight control the mouse input is not taken at the correct place.
I have to click above the control to get it. This behavior can be seen here:
http://silverlight.codeplex.com/
Any idea how to fix this?
回答1:
There are numerous reports of the issue and some possible fixes.
See these links:
http://forums.silverlight.net/p/227806/614938.aspx
"I decided to try uninstalling and reinstalling firefox and that did the trick."
https://support.mozilla.org/en-US/questions/795168
"Enabling the plugin-container.exe in about:config (dom.ipc.plugins.enabled) fixes the mouse issue but then Silverlight plugin pop-ups (webcam/microphone permission for example) freeze the browser."
Windowless Silverlight (and Flash?) app on Firefox: wrong mouse positions reported
"This problem doesn't happen if you do one of the following:
- Switch Firefox into full screen mode (it seems that the top bar is the cause for the offset, so when it's not visible there is no offset).
- Do not use Silverlight in a windowless mode.
- Use any other browser.
...
In my research I came across the following suggested workarounds...:
- Do not use overflow in css.
- Use css to set html margin of 1px.
- Do not use iframe"
来源:https://stackoverflow.com/questions/1946588/silverlight-bad-mouse-position-when-embedded-in-html-page-when-firefox-has-zoom