IE 8 和 IE 11 上的 Flex 应用程序中的退格问题 [英] Backspace issue in Flex Application on IE 8 and IE 11

查看:20
本文介绍了IE 8 和 IE 11 上的 Flex 应用程序中的退格问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是众所周知的,在 IE 中出于某种疯狂的原因 Backspace 用于返回您的历史导航.在 flex web 应用程序中,有时会出现这个 microsoft bug,以透明和简单的方式解决是一个非常令人头疼的问题.

This problem is well known that in IE for some crazy reason Backspace is used to go back your history navigation. In flex web applications sometimes this microsoft bug appears and it is a very bad headache to solve in a transparent and easy way.

通常当您正在编辑文本且 textarea 或 textinput 在 TabNavigator 容器内或您正在编辑文本且 textarea 在弹出窗口内时,会出现此问题.

Usually this problem occurs when you are editing text and textarea or textinput is inside TabNavigator container or you are editing text and textarea is inside a popup window.

推荐答案

我对这个问题有更好的答案.尤里的回答对我没有帮助.编辑 adobe 的 history.js 文件有什么帮助:

I have a better answer to this problem. Yury's answer didn't help in my case. What did help was editing the adobe's history.js file:

在文件顶部附近,他们检查用户代理:

Near the top of the file they check the useragent:

} else if (useragent.indexOf("msie") != -1 ) {
    browser.ie = true;
    browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));

我注意到它没有选择 Internet Explorer,因为用户代理现在说的是mozilla"而不是 msie.

I noticed that it wasn't picking up Internet Explorer, since the useragent now says "mozilla" instead of msie.

} else if  (useragent.match(/msie|trident|edge/) ) {
        browser.ie = true;
       browser.version = useragent.indexOf('msie') < 0 ? 7 :  parseFloat(useragent.substring(useragent.indexOf('msie') + 4));

如果匹配 trident 或 edge,我只是将版本设置为 7,因为此版本的 adobe 代码仅检查 7 或更少.

I'm just setting the version to be 7 if it matches trident or edge because this version of adobe's code only checks for 7 or less.

这篇关于IE 8 和 IE 11 上的 Flex 应用程序中的退格问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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