Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

@Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Jun 13, 2020

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

  • On a md-select nested within a md-toolbar which has md-scroll-shrink activated,
    when onChangeScrollShrink is called, closestContent contains the md-select's md-content, which is later moved to the body, but it's already too late, scroll listeners have already been applied.
  • md-scroll-shrink does not work if content is scrolled too soon after page load

Issue Number:
Fixes #10413. Closes #9871

What is the new behavior?

  • md-toolbar only looks for sibling md-content elements and not md-content elements within the toolbar itself
  • md-scroll-shrink works even if content is scrolled soon after page load

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Original PR: #9856
2nd try PR: #9871

@googlebot
Copy link

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.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ label Jun 13, 2020
@Splaktar Splaktar force-pushed the toolbar-scroll-shrink branch from bc8d144 to 8fb4106 Compare June 13, 2020 06:01
- find the proper `md-content`, which should be a sibling of the toolbar
- fix scroll shrink breaking if content scrolled too quickly after page load
- improve JSDoc

Fixes #10413. Closes #9871.
@Splaktar Splaktar force-pushed the toolbar-scroll-shrink branch from 8fb4106 to 0fcf561 Compare June 13, 2020 06:05
@Splaktar
Copy link
Contributor Author

Caretaker Note

CLA approval happened on previous PR here: #9871 (comment)

@Splaktar Splaktar added this to the 1.1.23 milestone Jun 13, 2020
@Splaktar Splaktar self-assigned this Jun 13, 2020
@Splaktar Splaktar requested a review from andrewseguin June 13, 2020 06:09
@Splaktar Splaktar added P2: required Issues that must be fixed. type: bug ux: integration pr: merge ready This PR is ready for a caretaker to review labels Jun 13, 2020
@andrewseguin andrewseguin added cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ and removed cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ labels Jun 15, 2020
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@andrewseguin andrewseguin added the pr: lgtm This PR has been approved by the reviewer label Jun 15, 2020
@Splaktar Splaktar merged commit 1ed54bb into master Jun 15, 2020
@Splaktar Splaktar deleted the toolbar-scroll-shrink branch June 15, 2020 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug ux: integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toolbar: md-scroll-shrink does not work if content is scrolled too soon after page load

3 participants