Skip to content
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

bug(minimise): minimise not functioning as expected when viewport not at top of page on load #21

Closed
jackhkmatthews opened this issue Jun 6, 2018 · 6 comments
Labels

Comments

@jackhkmatthews
Copy link
Contributor

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

sn-minimise class not applied correctly to nav element in repo example app when page loaded with viewport not at top of page.

Expected behavior

sn-minimise class should be be applied as normal (e.g when page loaded with viewport at top of page)

Environment

This repos demo app.

@mbarbuscio
Copy link

Came here for the same issue. +1

@marianobarbuscio
Copy link

@edoparearyee any chance this might get implemented?

@edoparearyee
Copy link

Hi @mbarbuscio thanks for using this library. Unfortunately we've been very busy recently so not had a chance to take a look at this yet. This should be fixed as it's a bug. Hopefully have a chance to look at it within the next week or so.

@edoparearyee
Copy link

I am unable to replicate this in the example app so closing for now. If someone can successfully replicate this issue I will reopen it.

@mbarbuscio
Copy link

Just tested this thorougly. Apparently, the component works fine if you add the (minimiseChange) event handler on the element that has the directive. If there is no event handler, when you navigate or refresh the page whatever is the current scroll will be taken as the initial position and not apply the minimise class.

@edoparearyee
Copy link

@mbarbuscio I tested this and found out this wasn't the issue. I was able to replicate this by turning on OnPush change detection instead.

Will get a fix out soon.

@edoparearyee edoparearyee reopened this Oct 9, 2018
edoparearyee added a commit that referenced this issue Oct 10, 2018
Fixed a bug when using OnPush change detection where minimise state was not being set correctly on
page load and scroll position is not at the top of the page

Fix #21
edoparearyee added a commit that referenced this issue Oct 10, 2018
Fixed a bug when using OnPush change detection where minimise state was not being set correctly on page load and scroll position is not at the top of the page

Fix #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants