Skip to content

Overwrite scroll-behavior when setting scroll-position #7139

@filipbech

Description

@filipbech

Bug, feature request, or proposal:

When a scroll-behavior is present and Material wants to set (not smoothly scroll to) a scroll-position, we should overwrite that css-property while changing the scroll-position.

What is the expected behavior?

That I wont notive

What is the current behavior?

I get a weird scrolling feeling

What are the steps to reproduce?

add scroll-behavior:smooth; to html element
scroll down and open a dialog. Close the dialog and see the smooth scrolling happen...

example plunkr:
https://plnkr.co/edit/kQNavjkozevBalxAq785?p=preview

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

New browser feature

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

all

Is there anything else we should know?

smooth-scrolling is not supported everywhere yet, so use newest chrome to reproduce

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions