当开发人员工具打开IE11时,网站的行为有所不同 [英] Site behaves differently when developer tools are open IE11

查看:85
本文介绍了当开发人员工具打开IE11时,网站的行为有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE11中使用以下模板,无法弄清每次导航时边栏都会唱歌的原因。当开发人员工具打开时,它的行为就像我想要的那样。通过在运行IE11时单击树中UI元素下的任何选项卡,可以轻松地对其进行演示。但是,您会注意到,如果F12开发人员工具已打开,则每次导航时侧栏不会滑动。在chrome中这不是问题。 fastclick可能会显示一个错误,但是我没有fastclick就跑了,并且仍然会发生。任何帮助都会很棒。谢谢。
https://almsaeedstudio.com/themes/AdminLTE/pages/UI /general.html

Im using the following template in IE11 and can not figure out why the sidebar sings in every time navigation is happening. When developer tools are open it behaves as I would like it to. It is easily demoed by clicking on any one of the tabs under UI element in the tree while running IE11. However you will notice if F12 developer tools are open the side bar does not slide in every time navigation happens. This is not an issue in chrome. There is an error with fastclick that may show up however I have ran without fastclick and it still happens. Any help would be great. Thanks. https://almsaeedstudio.com/themes/AdminLTE/pages/UI/general.html

推荐答案

尝试删除任何 console.log()

console.log()可以在调试Javascript时提供帮助使IE完全停止处理页面上的脚本。更令人费解的是,如果您在IE浏览器中打开devtools的情况下继续观看网页-您根本不会注意到任何问题。

console.log() which is to help out when debugging Javascript can cause IE to completely stop processing scripts on the page. To add to the mystery, if you keep watching your page in IE with devtools open - you won’t notice an issue at all.

说明 >

原因是除非在IE中打开devtools,否则不会实例化控制台对象。否则,您将看到以下两件事之一:

The reason for this is the console object is not instantiated unless devtools is open in IE. Otherwise, you will see one of two things:


  1. JavaScript无法正确执行

  2. 控制台出现错误,例如对象未定义或其他性质的错误

十分之九,您的控制台错误.log在某处的代码。这不会影响IE以外的任何其他浏览器。

Nine times out of ten, you have an errant console.log in the code somewhere. This does not affect any browser other than IE.

这篇关于当开发人员工具打开IE11时,网站的行为有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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