Skip to content

Window.scroll is broken by material #11552

@narthur157

Description

@narthur157

Bug, feature request, or proposal:

window.scroll() does not work on pages with material

What is the expected behavior?

window.scroll(0, 1500) in browser console should scroll the page

What is the current behavior?

no scroll occurs

What are the steps to reproduce?

run window.scroll(0, 1500) on https://v5.material.angular.io/ (or v6)

What is the use-case or motivation for changing an existing behavior?

scroll is useful

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular material - 5.2.4, 6
Chrome 66, Windows 7
Firefox 59, Windows 7

Is there anything else we should know?

assuming angular docs are written in angular, it's working in angular (tried using window.scroll here and it worked https://angular.io/api/common/http/HttpClient)

This used to work, but I'm not sure when. I don't think it has to do with v6

Printing the value of window.scroll shows a function with native code, so it doesn't appear to be re-assigned. I tried assigning a proxy function to print out when window scroll is called to see if it was being cancelled out or something, but no calls were made except the ones from myself.

There's no errors in the console, it just fails silently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions