roost-im / roost-client

The official client for Roost.
MIT License
1 stars 6 forks source link

Page-Up/Page-Down do not work when page is first loaded #100

Closed vasilvv closed 9 years ago

vasilvv commented 9 years ago

The same is the case after zooming in or out of class. Justin suggests it's an on-load focus issue.

dovej commented 9 years ago

Reproduced on Chrome on my Macbook Air. I believe this is a focus issue as clicking on a pane fixes it and clicking on the top bar breaks it again.

lightquake commented 9 years ago

This is an issue with something that's almost but not quite focus, because calling .focus() on the div doesn't fix it. I'm not 100% sure what to do.

vasilvv commented 9 years ago

One possibility would be to manually capture and redefine behavior of PageUp/PageDown, since the reason Home, End, Up and Down work when PgUp/PgDown don't is that they are redefined.

davidben commented 9 years ago

Oh, this sounds familiar. You need to do something funny for overflow divs to be focusable. I think you give it a tabIndex? If you dig in the history of Roost 1.0, before the Angular rewrite, you should find something. I hopefully kept history then. I think you also want to then hide the focus ring because it'll draw one and it looks silly.

lightquake commented 9 years ago

tabIndex was the magic word, thanks :)