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

Problem with minimize / maximize browser window #17

Open
luboslav opened this issue Nov 29, 2017 · 2 comments
Open

Problem with minimize / maximize browser window #17

luboslav opened this issue Nov 29, 2017 · 2 comments

Comments

@luboslav
Copy link

When you open demo (https://codepen.io/lukejacksonn/pen/BowbWE) for example in 700px wide browser window and then you maximize window it doesn't render correctly.

700px browser window
greedy-nav-700px

Fullscreen mode (1920x1080)
greedy-nav-fullscreen

@lukejacksonn
Copy link
Owner

So it doesn't, does it! I am guessing this happens because entering full screen doesn't trigger a resize event (which it probably should). So the solution will revolve around that thought.

https://stackoverflow.com/questions/34422052/how-to-detect-browser-has-gone-to-full-screen

Do you fancy looking into it further?

@luboslav
Copy link
Author

First i want to say that codepen demo is outdated.

I've tested code from github too and there is similar error. Resize event is triggering correctly but calculation of available space is wrong because check function is called with no delay. Getting instant state is executed before menu items completely render. Debouncing check and resize event handling can improve performance too.

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