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

后端 未结 4 1046
小鲜肉
小鲜肉 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 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
    }
    

提交回复
热议问题