Only legal moves shown in drop down

Only legal moves appear in the drop down. Also, clicking now works
properly regardless of whether or not the page is scrolled