Firefox上的无窗口Silverlight(和Flash?)应用程序:报告错误的鼠标位置 [英] Windowless Silverlight (and Flash?) app on Firefox: wrong mouse positions reported

查看:193
本文介绍了Firefox上的无窗口Silverlight(和Flash?)应用程序:报告错误的鼠标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建一个无窗口的Silverlight应用程序并在Firefox上运行它时,会报告错误的鼠标位置。在实际的鼠标位置和应用程序的响应之间有一个垂直偏移。我还用Flash标记了这个问题,因为我的研究表明这个问题也会发生在Flash (请参阅下面的链接)。

重现:



第1步:创建一个新的Silverlight应用程序。步骤2:在MainApp.xaml的网格内添加以下内容:

< p

HyperlinkBut​​ton NavigateUri =http://google.comVerticalAlignment =CenterHorizo​​ntalAlignment =Center> GOOGLE< / HyperlinkBut​​ton>



步骤3:在SilverApplicationXTestPage.aspx(在Web项目中)中,将以下参数添加到Silverlight对象:
$ b $ p $ lt; code>< param name = windowlessvalue =true/>



现在运行silverlight应用程序。当您悬停链接时,不会加下划线。现在缓慢地移动鼠标,直到链接上方的某个偏移量,它将被突出显示。



如果您执行以下任一操作,则不会发生此问题: p>


  1. 将Firefox切换到全屏模式(看起来顶栏是偏移的原因,所以当它不可见时不会有偏移) 。
  2. 不要在无窗口模式下使用Silverlight。

  3. 使用任何其他浏览器。



  4. 我在Windows 7上使用Firefox 8.0上的Silverlight 4。



    这似乎是一个老问题,不仅影响Silverlight,还有Flash。



    在我的研究中,我遇到了以下建议的解决方法,其中非我的工作:


    • 不要在css中使用溢出。
    • 使用css设置1px的页边距。

    • 不要使用iframe(但上面的再现步骤无论如何都不使用iframe)。


      正如我所提到的,abo

      这里有一些提到这个问题或类似的提及:

      http://forums.silverlight.net/t/161640.aspx/1/10 a>



      https:// bugzilla.mozilla.org/show_bug.cgi?id=362193

      http://forums.silverlight.net/t/94583.aspx/2/10#



      https://bugzilla.mozilla.org/show_bug.cgi?id=536429



      有谁知道如何解决这个问题?任何解决方法?我很绝望!

      解决方案

      我发现这个: http://support.mozilla.org/zh-CN/questions/795168



      在about:config(dom.ipc.plugins.enabled)中启用plugin-container.exe可以修复鼠标问题,但是Silverlight插件弹出窗口(例如摄像头/麦克风权限)会冻结浏览器。



      在更改配置后,我没有看到弹出式菜单(复制权限)的问题。



      屏幕也帮助我做这个配置更改之前。

      这要求用户改变他们的浏览器设置,这并不理想。

      这与此类似问题: Silverlight-坏老鼠当Firefox变焦时嵌入到HTML页面中的位置


      When I create a windowless Silverlight app and run it on Firefox, wrong mouse positions are reported. There is a vertical offset between the actual mouse position and what the application responds to.

      I also tagged this question with Flash because my research shows that this problem also occurs with Flash (see links below).

      To reproduce:

      Step 1: Create a new Silverlight application.

      Step 2: Inside the grid of MainApp.xaml add the following:

      <HyperlinkButton NavigateUri="http://google.com" VerticalAlignment="Center" HorizontalAlignment="Center">GOOGLE</HyperlinkButton>

      Step 3: In SilverApplicationXTestPage.aspx (in the web project) add the following parameter to the Silverlight object:

      <param name="windowless" value="true" />

      Now run the silverlight application. When you hover the link it doesn't get underlined. Now slowly move the mouse up until at a certain offset above the link it will get highlighted.

      This problem doesn't happen if you do one of the following:

      1. 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).
      2. Do not use Silverlight in a windowless mode.
      3. Use any other browser.

      I'm using Silverlight 4 on Firefox 8.0 on Windows 7.

      This seems like an old problem that affects not just Silverlight, but also Flash.

      In my research I came across the following suggested workarounds, non of which worked for me:

      • Do not use overflow in css.
      • Use css to set html margin of 1px.
      • Do not use iframe (but the reproduction steps above do not use an iframe anyway).

      As I mentioned none of the above workarounds seem to work.

      Here are some references to mentions of this problem or similar:

      http://forums.silverlight.net/t/161640.aspx/1/10

      https://bugzilla.mozilla.org/show_bug.cgi?id=362193

      http://forums.silverlight.net/t/94583.aspx/2/10#

      https://bugzilla.mozilla.org/show_bug.cgi?id=536429

      Does anyone know how to overcome this? Any workaround? I'm desperate!

      解决方案

      I found this: http://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."

      I didn't see the problem with the popup (a copy permissions) after changing the config.

      Making it full-screen also helped before I made this config change.

      This requires the user to change their browser setting, which is not ideal.

      This is similar to this question: Silverlight- bad mouse position when embedded in html page when Firefox has zoom

      这篇关于Firefox上的无窗口Silverlight(和Flash?)应用程序:报告错误的鼠标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆