Skip to content

fix detecting scroll behavior in edge - #17960

Closed
SteveRusin wants to merge 2 commits into
angular:masterfrom
SteveRusin:fix-detecting-scroll-in-edge
Closed

fix detecting scroll behavior in edge#17960
SteveRusin wants to merge 2 commits into
angular:masterfrom
SteveRusin:fix-detecting-scroll-in-edge

Conversation

@SteveRusin

Copy link
Copy Markdown
'scrollBehavior' in document.documentElement!.style

returns true after using overlay due to this code. This check returns false for an edge before opening modal

from MDN

If you set a property to undefined but do not delete it, the in operator returns true for that property.

I faced this issue in production in my app. I'm using virtual scrolling for mat-select in our modal.
After trying to open select and restore the scrolling index of the selected item app crashes in the edge.
Please have a look at this issue.

This is my code to restore the index

  @ViewChild(CdkVirtualScrollViewport, { static: true }) vsViewport: CdkVirtualScrollViewport;
/// indx => index of the selected item
this.vsViewport.scrollToIndex(indx);

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla label Dec 13, 2019
@crisbeto

Copy link
Copy Markdown
Member

There's a fix for this already in #17223.

@SteveRusin SteveRusin closed this Dec 16, 2019
@SteveRusin
SteveRusin deleted the fix-detecting-scroll-in-edge branch December 16, 2019 09:33
@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 Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants