Focus on ACE editor when appropriate (fixed #925)

@devoncarew