Skip to content

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

Merged
annieyw merged 1 commit into
angular:masterfrom
crisbeto:17221/scroll-behavior-feature-detection
Jan 6, 2021
Merged

fix(cdk/overlay): block scroll strategy throwing off scroll behavior feature detection#17223
annieyw merged 1 commit into
angular:masterfrom
crisbeto:17221/scroll-behavior-feature-detection

Conversation

@crisbeto

@crisbeto crisbeto commented Sep 28, 2019

Copy link
Copy Markdown
Member

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

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

jelbourn commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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