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

Incorrect resizing when the window is maximized #8

Closed
ghost opened this issue May 24, 2016 · 2 comments
Closed

Incorrect resizing when the window is maximized #8

ghost opened this issue May 24, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented May 24, 2016

Hello,

Great project!

I noticed one issue though, and maybe it would be easier to explain it by just mentioning how to reproduce it:

  1. Open a site which uses GreedyNav (even the examples will do, http://codepen.io/lukejacksonn/pen/BowbWE )
  2. Resize down the browser window. Greedy nav starts to correctly hide items
  3. Once several items are hidden, maximize the browser window.

Expected behavior:
All items in the navigation bar are now correctly displayed, as the window is maximized.

Actual behavior:
The navbar seems to update at some intermediary state, as only part of the navigation items are visible after the window was maximized, while others are still hidden.

Screenshot (1080x1920 monitor, full screen):

image

I assume it happens because the resize listener fires off in a weird way when a maximize is being performed, however I'm not a web dev so I don't know how to fix it myself in order to submit a pull request.

Kind regards,
CataJ

@ulfmaier
Copy link

ulfmaier commented Jun 2, 2016

There is a recursive call missing. After removing an element check() is called to check if more elements need to be removed. After adding an element this is not happening.

Add check(); in greedynav.js after L41 and it works.

@lukejacksonn
Copy link
Owner

Fixed by #9

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

No branches or pull requests

2 participants