Skip to content

fix(cdk/overlay): block scroll strategy throwing off scroll behavior feature detection #17223

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

Merged

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 28, 2019

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 crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Sep 28, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 28, 2019
@crisbeto crisbeto force-pushed the 17221/scroll-behavior-feature-detection branch from 0ee45ab to ca90b1b Compare September 28, 2019 05:15
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 30, 2019
@crisbeto crisbeto force-pushed the 17221/scroll-behavior-feature-detection branch from ca90b1b to 5f3ecde Compare March 3, 2020 21:35
@mmalerba mmalerba removed the lgtm label Jul 31, 2020
@MathewBerg
Copy link

We're currently experiencing this issue in our application and I see that this PR is still open. Is there a workaround or a polyfill we alleviate the issue?

@crisbeto crisbeto changed the title fix(overlay): block scroll strategy throwing off scroll behavior feature detection fix(cdk/overlay): block scroll strategy throwing off scroll behavior feature detection Dec 15, 2020
@crisbeto crisbeto force-pushed the 17221/scroll-behavior-feature-detection branch from 5f3ecde to bfc9874 Compare December 15, 2020 21:13
…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 crisbeto force-pushed the 17221/scroll-behavior-feature-detection branch from bfc9874 to 49af4c1 Compare December 31, 2020 09:01
@jelbourn
Copy link
Member

jelbourn commented Jan 5, 2021

It looks like this caused some test failures back when we last ran it through Google's internal presubmit system, but there's no note in our tracker of what those failures were, so we should give it a fresh presubmit.

@annieyw annieyw merged commit f940d34 into angular:master Jan 6, 2021
annieyw pushed a commit that referenced this pull request 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 pull request 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
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BlockScrollStrategy affects supportsScrollBehavior method in IE11
6 participants