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

Topnav flickering in default theme (+possible solution) #1984

Open
rolandtoth opened this issue Aug 24, 2016 · 2 comments
Open

Topnav flickering in default theme (+possible solution) #1984

rolandtoth opened this issue Aug 24, 2016 · 2 comments

Comments

@rolandtoth
Copy link

rolandtoth commented Aug 24, 2016

When hovering on a topnav item from the bottom sometimes the submenu flickers, see screencap here:

https://processwire.com/talk/topic/13389-adminonsteroids/?do=findComment&comment=126395

We found that the cause is the subpixel top position (46.5px). Setting it to 47px seems to solve it.

@ryancramerdesign
Copy link
Owner

Interesting, I'd never noticed that, but now I can see it–if I move my mouse really slowly, a quick flicker every once in awhile. Unfortunately I don't think that hardcoding the top position would be ideal because I suspect that since it's a dynamically calculated top position, it likely changes slightly with differences in the way fonts are rendered between platforms and browsers. But if I could isolate the location of where it's being calculated, I could make an adjustment from there. So far I can't find it, and am guessing it's buried somewhere away in jQuery UI. I'll keep hunting though.

@rolandtoth
Copy link
Author

Thanks! Meanwhile I may found why jQuery calculates this result. The "#topnav" has 0.5em margin-top and this results in 7.5 pixels (as shown in the dev tools box model figure). Perhaps changing this to a pixel value would be more safe.

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

No branches or pull requests

2 participants