-
Notifications
You must be signed in to change notification settings - Fork 26.2k
fix(common): make more restrictive the supportScrollRestoration method #28262
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
Conversation
c665584
to
6e63c1d
Compare
I feel that a better solution would be to use |
I can update this PR shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update this PR shortly
@wKoza take your time. Also, please make sure that we've got a test exposing the problem we are trying to fix here (we do run test on IE).
@wKoza - are you still interested in fixing this issue? |
@petebacondarwin , It was out of my mind but i can do that this week. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
39eba46
to
1371940
Compare
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
1371940
to
50f8eeb
Compare
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
50f8eeb
to
e356b5d
Compare
The PR has moved a lot since this and PK is not active at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Given that pageYOffset
is just an alias for scrollY
with better support (namely, in IE), this seems fine aside from the small concern that this could break a few tests.
@@ -166,7 +166,7 @@ export class BrowserViewportScroller implements ViewportScroller { | |||
|
|||
private supportsScrolling(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's really any value in this anymore. I wouldn't remove it at this point, but it appears that pageXOffset and scrollTo is supported in every browser that we support...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…llX / scrollY This fix ensures a better cross-browser compatibility. This fix has been used for angular.io.
…of scrollX / scrollY
b38df64
to
9755ef2
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
closes #27957
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, ViewportScroller does not work in Internet Explorer because of the use of scrollX and scrollY. Neither of which are supported by Internet Explorer.
Issue Number: #27957
What is the new behavior?
We check these properties with the supportScrollRestoration method before calling them in getScrollPosition()
Does this PR introduce a breaking change?
Other information