Fixes for the javascript prototype to jquery conversion regressions.

Fix for JS value settings and for a focus on top of #994 and #980, also fixes #987