fix backspace problem in chrome/safari

see http://yuilibrary.com/trac-archive/tickets/2532834.html for detailed problem description
fixes #2532834, but reopens #2531090, which is imho not as important as the backspace problem, since this makes the editor unusable.