I'm working on an application that has a side panel and main timeline view. Users are to be able to select an item from the side panel and drag it into the timeline view.
To drag the item, the user presses and holds the left mouse button down, and drags the item to the timeline view. The user should now be able to use arrow keys to scroll the time line up and down, however when these buttons are pressed the side panel is scrolled instead. On mousedown I've tried to set the focus to my timeline element but that is not working.
onMouseDown = () => {
...
document.getElementById('timeLine').focus() // does not change the focus to the timeline
}
Is it possible to force the browser to change focus while the mouse button is being held down? My current fix is to force an animation to scroll the timeline view using jQuery, but this is results in quite a slow animation compared to a real browser scroll event.