Browser scrolls to the bottom of the page automatically on load in Localhost

后端 未结 4 1042
小鲜肉
小鲜肉 2021-01-18 02:09

This is the most strange problem I\'ve ever seen. I\'m using Visual Studio Enterprise 2015 Version 14.0.25425.01 Update 3 and developing .NET web applications. Today when I

相关标签:
4条回答
  • 2021-01-18 02:35

    This was caused by a recent update to the Web Accessibility Checker extension. I've just released version 1.4.47 with a fix

    0 讨论(0)
  • 2021-01-18 02:36

    I've just had this and it is definitely Browser Link in my case. To disable this, you can add this setting to your web.config.

    <add key="vs:EnableBrowserLink" value="false" />
    

    As @Salman points out, this should live in the appSettings section:

    <appSettings>
        <add key="vs:EnableBrowserLink" value="false" />
    </appSettings>
    
    0 讨论(0)
  • 2021-01-18 02:59

    I've experienced this problem too and it began for me yesterday. Same symptoms - happens locally but not if published.

    A windows update was implemented yesterday - Update for Windows 7 for x64-based systems (KB2952664). I'm wondering if they are linked.

    Disabling browser link works for me also

    0 讨论(0)
  • 2021-01-18 03:02

    Browser behavior (issue):

    Browser scrolls to the bottom of the page automatically on load.


    Problem:

    Web Essentials is somehow causing a bug in Browser Link.


    Temporal Solution (no changes to web.config):

    1) Disable Browser Link > Uncheck the following checkbox:

    OR

    2) Disable Web Essentials Extension.

    Further Details:

    Apparently the problem resides when they use Element.scrollIntoView() along this lines in browserLink.js:

    u.getBackgroundColor = function(a) {
      var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
        e = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
      e !== !0 && a.scrollIntoView();
      var f = [],
        g = u.getBackgroundStack(a);
      return (g || []).some(function(e) {
          var g = window.getComputedStyle(e),
            h = d(e, g);
          return a !== e && !v.visuallyContains(a, e) && 0 !== h.alpha || c(e, g) ? (f = null,
            b.push(e), !0) : 0 !== h.alpha && (b.push(e),
            f.push(h),
            1 === h.alpha)
        }),
        null !== f && null !== g ? (f.push(new u.Color(255, 255, 255, 1)),
          f.reduce(u.flattenColors)) : null
    }
    
    0 讨论(0)
提交回复
热议问题