Reformat editmode.js
Fallback to default behavior when continuous scroll is not supported.