Edge browser not work with scrollTo method

Confirmed Issue #15534521 • Assigned to wptcomptri

Details

Author
ofir f.
Created
Jan 19, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 6 people

Sign in to watch or report this issue.

Steps to reproduce

jsfiddle demo

HTML

<button id="btn">Scroll UP</button>
<div class="wrapper" id="wrapper">
  <div class="inner"></div>
</div>

CSS

.wrapper {
  height: 400px;
  width: 400px;
  background: red;
  overflow: auto;
}

.inner{
   height: 1400px;
   width: 400px;
   background: green;
}

JS

document.getElementById('btn').addEventListener('click', goUp);

const wrapper = document.getElementById('wrapper');

function goUp() {
  wrapper.scrollTo(0,0);
}

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To to “wptcomptri”

      Changed Title from “Edge browser not work with scrollTo method” to “Edge browser not work with scrollTo method”

      Changed Status to “Confirmed”

    • Do we have any progress on this or is there a workaround to make this work?

    • This seems to work as a workaround: .scrollTop = 0 instead of .scrollTo(0,0) In case you want to scroll somewhere else than top i haven’t found a workaround

    • Microsoft Edge Team

      Changed Assigned To from “wptcomptri” to “Rahul A.”

      Changed Assigned To to “wptcomptri”

    • It seems to be a method used in many JavaScript libraries. As a developer, we can not proceed with the workaround for this reason. We look forward to your support.

    • It seems to be a method used in many JavaScript libraries. As a developer, we can not proceed with the workaround for this reason. We look forward to your support.

    • It seems to be a method used in many JavaScript libraries. As a developer, we can not proceed with the workaround for this reason. We look forward to your support.

    • Here is the spec for Element.scrollTo() with 2 different signatures:

      https://www.w3.org/TR/cssom-view/#extension-to-the-element-interface

      void scrollTo(optional ScrollToOptions options);
      void scrollTo(unrestricted double x, unrestricted double y);

      Need to support both signatures.

    • Last update from the Microsoft Edge Team is in June. Will there be a fix for this??

    You need to sign in to your Microsoft account to add a comment.

    Sign in