-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Router/common: Refactors and fixes the BrowserViewportScroller's scrolling behavior #40241
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `BrowserViewportScroller` injects but does not use the `ErrorHandler`. This commit removes the `ErrorHandler` from the constructor.
atscott
force-pushed
the
routerscroller
branch
from
December 22, 2020 20:57
85aff66
to
8193224
Compare
The current tests in the router scroller are [change-detector tests](https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html) and do not ensure the correct behavior of the scroller. This commit updates the tests to assert actual scrolling behavior of the browser.
atscott
force-pushed
the
routerscroller
branch
from
December 22, 2020 20:57
8193224
to
193493f
Compare
atscott
force-pushed
the
routerscroller
branch
2 times, most recently
from
December 22, 2020 23:16
be21305
to
bf363b4
Compare
atscott
changed the title
Routerscroller
Router/common: Refactors and fixes the BrowserViewportScroller's scrolling behavior
Dec 28, 2020
pullapprove
bot
added
the
area: common
Issues related to APIs in the @angular/common package
label
Dec 28, 2020
atscott
added
target: patch
This PR is targeted for the next patch release
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
Dec 28, 2020
According to the [spec](https://html.spec.whatwg.org/#scroll-to-fragid), we should attempt to set the browser focus after scrolling to a fragment. Note that this change does not exactly follow the robust steps outlined in the spec by finding a fallback target if the original is not focusable. Instead, we simply attempt to focus the element by calling `focus` on it, which will do nothing if the element is not focusable. fixes angular#30067
atscott
force-pushed
the
routerscroller
branch
from
December 28, 2020 17:36
bf363b4
to
1c9db4c
Compare
alfaproject
reviewed
Dec 28, 2020
petebacondarwin
approved these changes
Dec 29, 2020
atscott
added
action: merge
The PR is ready for merge by the caretaker
and removed
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
Dec 29, 2020
josephperrott
pushed a commit
that referenced
this pull request
Jan 5, 2021
The current tests in the router scroller are [change-detector tests](https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html) and do not ensure the correct behavior of the scroller. This commit updates the tests to assert actual scrolling behavior of the browser. PR Close #40241
josephperrott
pushed a commit
that referenced
this pull request
Jan 5, 2021
According to the [spec](https://html.spec.whatwg.org/#scroll-to-fragid), we should attempt to set the browser focus after scrolling to a fragment. Note that this change does not exactly follow the robust steps outlined in the spec by finding a fallback target if the original is not focusable. Instead, we simply attempt to focus the element by calling `focus` on it, which will do nothing if the element is not focusable. fixes #30067 PR Close #40241
josephperrott
pushed a commit
that referenced
this pull request
Jan 5, 2021
The current tests in the router scroller are [change-detector tests](https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html) and do not ensure the correct behavior of the scroller. This commit updates the tests to assert actual scrolling behavior of the browser. PR Close #40241
josephperrott
pushed a commit
that referenced
this pull request
Jan 5, 2021
According to the [spec](https://html.spec.whatwg.org/#scroll-to-fragid), we should attempt to set the browser focus after scrolling to a fragment. Note that this change does not exactly follow the robust steps outlined in the spec by finding a fallback target if the original is not focusable. Instead, we simply attempt to focus the element by calling `focus` on it, which will do nothing if the element is not focusable. fixes #30067 PR Close #40241
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. |
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
area: common
Issues related to APIs in the @angular/common package
cla: yes
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors and fixes the
BrowserViewportScroller
's scrolling behavior.Commit 1:
The
BrowserViewportScroller
injects but does not use theErrorHandler
.This commit removes the
ErrorHandler
from the constructor.Commit 2:
The current tests in the router scroller are
change-detector tests
and do not ensure the correct behavior of the scroller.
This commit updates the tests to assert actual scrolling behavior of the
browser.
Commit 3:
According to the spec,
we should attempt to set the browser focus after scrolling to a
fragment. Note that this change does not exactly follow the robust steps
outlined in the spec by finding a fallback target if the original is not
focusable. Instead, we simply attempt to focus the element by calling
focus
on it, which will do nothing if the element is not focusable.fixes #30067