jfly/twisty.js — comment on commit d030368c2b8f47cdaa9bf2d459774d721994171f
File:  line 0
By lgarron:

This seems to have the desired effect, though I'm not sure it's the most stable solution if twisty.js gets embedded in another site. What I really want to do is make the cube focusable like any other input field, which is what the text input hack did (in addition to providing a nice display of the latest pressed key).

As for visual indication, canvasFocused toggled the background. I spent a long while trying to fiddle with the border, but issues with margins were really annoying.