Closed tcrgit closed 10 years ago
CSS simplified
<style>
#div1 { height: 50px; overflow:auto; border:red thin solid; }
#div1description { height: 50px; overflow:auto; border:red thin solid; }
</style>
Could you isolate the issue so I can look at it?
http://jsbin.com http://jsfiddle.net http://codepen.io http://liveweave.com
URL to latest version of Sly:
I created the jsfiddle and updated to use the link tot he most recent sly you posted above. First press of up or down arrow after clicking in a sly window will move in sync. If they are out of sync, they will sync with each other and then scroll in unison.
Oh, I somehow brainfarted when reading the issue description.
Yes, keyboard navigation will do this. If you specify keyboardNavBy
, the concerned sly instance will bind navigation to arrow keys. If you do this for more than one instance, it is obvious that the arrow keys will control multiple sly instances.
I don't know about any sane way how to control multiple sly instances independently with the same keyboard keys. The only exception being 2 sly instances, one horizontal and one vertical. In this case the vertical will be controlled with left & right arrows, while horizontal will be controlled with up & down arrows.
You can disable/enable arrow navigation in runtime by modifying the keyboardNavBy
option with sly.set('keyboardNav', newValue)
. This should make it possible for you to decide when each particular sly instance should accept keyboard navigation.
I have several sly objects on my page. They scroll independently using the mouse wheel and buttons. But they do not scroll independently using the arrow keys, but move in sync.
This issue occurs with only two, e.g:
HTML simplified: