NV / flying-focus

UI concept
http://n12v.com/focus-transition/
MIT License
443 stars 44 forks source link

Account for window resize #8

Closed leoj3n closed 10 years ago

leoj3n commented 10 years ago

If Flying Focus wraps an element on focus before a reduction in window size, and that element is initially wider than the width of the resized window, a horizontal scrollbar will appear.

NV commented 10 years ago

I solved the problem same problem for Focus Snail but I didn’t port it to Flying Focus. Focus Snail doesn’t rely on resize event at all, instead it uses blur event to get the position of previously focus element: focus-snail.js#L123. I haven’t noticed any problems with it so far.

I believe it’s a more robust solution. It leverages not only resizing but style and DOM changes on the page.

leoj3n commented 10 years ago

Agreed. Focus Snail is really cool; I'll be using that instead of Flying Focus.

Thanks @NV. Closing this now.