Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockScrollStrategy affects supportsScrollBehavior method in IE11 #17221

Closed
wonderlaw1 opened this issue Sep 27, 2019 · 1 comment · Fixed by #17223
Closed

BlockScrollStrategy affects supportsScrollBehavior method in IE11 #17221

wonderlaw1 opened this issue Sep 27, 2019 · 1 comment · Fixed by #17223
Assignees
Labels
area: cdk/scrolling P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@wonderlaw1
Copy link

wonderlaw1 commented Sep 27, 2019

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-cdk-overlay-issue-apycr4

Steps to reproduce:

  1. Open example in IE11
  2. Click "Open Dialog" button
  3. Close Dialog
  4. Click "Check supportsScrollBehavior" button
  5. Open console
  6. "ERROR!!! IE11 doesn't support scroll-behavior" message presented into the console

Expected Behavior

BlockScrollStrategy.disable shouldn't add "scroll-behavior" style property to html element by design.

Actual Behavior

BlockScrollStrategy.disable was called by MatDialog and it mutates style object of html element by adding scrollBehavior property into it. Due to specification this property shouldn't be. And it affects also supportsScrollBehavior method, because after BlockScrollStrategy.disable call IE11 "supports" scroll-behavior, but it doesn't.

Environment

  • Angular: 8.0+
  • CDK/Material: 8.0+
  • Browser(s): IE11
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
@wonderlaw1 wonderlaw1 changed the title BlockScrollStrategy affects supportsScrollBehavior method in IE11 BlockScrollStrategy affects work of supportsScrollBehavior method in IE11 Sep 27, 2019
@wonderlaw1 wonderlaw1 changed the title BlockScrollStrategy affects work of supportsScrollBehavior method in IE11 BlockScrollStrategy affects supportsScrollBehavior method in IE11 Sep 27, 2019
@wonderlaw1 wonderlaw1 changed the title BlockScrollStrategy affects supportsScrollBehavior method in IE11 BlockScrollStrategy affects supportsScrollBehavior method in IE11 and Safari Sep 27, 2019
@wonderlaw1 wonderlaw1 changed the title BlockScrollStrategy affects supportsScrollBehavior method in IE11 and Safari BlockScrollStrategy affects supportsScrollBehavior method in IE11 Sep 27, 2019
@crisbeto crisbeto self-assigned this Sep 28, 2019
@crisbeto crisbeto added has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Sep 28, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 28, 2019
…ure detection

Do avoid a scrolling animation when we disable scrollig, we remove and re-set the `scroll-behavior` property on the body without feature checking it. The problem is that since we've set the property to *something*, our `scrollBehaviorSupported` feature check will be thrown off because it checks for `'scrollBehavior' in document.documentElement.style`.

Fixes angular#17221.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 28, 2019
…ure detection

To avoid a scrolling animation when we disable scrollig, we remove and re-set the `scroll-behavior` property on the body without feature checking it. The problem is that since we've set the property to *something*, our `scrollBehaviorSupported` feature check will be thrown off because it checks for `'scrollBehavior' in document.documentElement.style`.

Fixes angular#17221.
jelbourn pushed a commit that referenced this issue Nov 20, 2019
…ure detection

To avoid a scrolling animation when we disable scrollig, we remove and re-set the `scroll-behavior` property on the body without feature checking it. The problem is that since we've set the property to *something*, our `scrollBehaviorSupported` feature check will be thrown off because it checks for `'scrollBehavior' in document.documentElement.style`.

Fixes #17221.
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 3, 2020
…ure detection

To avoid a scrolling animation when we disable scrollig, we remove and re-set the `scroll-behavior` property on the body without feature checking it. The problem is that since we've set the property to *something*, our `scrollBehaviorSupported` feature check will be thrown off because it checks for `'scrollBehavior' in document.documentElement.style`.

Fixes angular#17221.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 15, 2020
…feature detection

To avoid a scrolling animation when we disable scrollig, we remove and re-set the
`scroll-behavior` property on the body without feature checking it. The problem is
that since we've set the property to *something*, our `scrollBehaviorSupported`
feature check will be thrown off because it checks for `'scrollBehavior' in
document.documentElement.style`.

Fixes angular#17221.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 31, 2020
…feature detection

To avoid a scrolling animation when we disable scrollig, we remove and re-set the
`scroll-behavior` property on the body without feature checking it. The problem is
that since we've set the property to *something*, our `scrollBehaviorSupported`
feature check will be thrown off because it checks for `'scrollBehavior' in
document.documentElement.style`.

Fixes angular#17221.
annieyw pushed a commit that referenced this issue Jan 6, 2021
…feature detection (#17223)

To avoid a scrolling animation when we disable scrollig, we remove and re-set the
`scroll-behavior` property on the body without feature checking it. The problem is
that since we've set the property to *something*, our `scrollBehaviorSupported`
feature check will be thrown off because it checks for `'scrollBehavior' in
document.documentElement.style`.

Fixes #17221.
annieyw pushed a commit that referenced this issue Jan 6, 2021
…feature detection (#17223)

To avoid a scrolling animation when we disable scrollig, we remove and re-set the
`scroll-behavior` property on the body without feature checking it. The problem is
that since we've set the property to *something*, our `scrollBehaviorSupported`
feature check will be thrown off because it checks for `'scrollBehavior' in
document.documentElement.style`.

Fixes #17221.

(cherry picked from commit f940d34)
wagnermaciel pushed a commit to wagnermaciel/components that referenced this issue Jan 14, 2021
…feature detection (angular#17223)

To avoid a scrolling animation when we disable scrollig, we remove and re-set the
`scroll-behavior` property on the body without feature checking it. The problem is
that since we've set the property to *something*, our `scrollBehaviorSupported`
feature check will be thrown off because it checks for `'scrollBehavior' in
document.documentElement.style`.

Fixes angular#17221.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/scrolling P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
3 participants