honestbleeps/Reddit-Enhancement-Suite — Issue #42: Live preview losing focus (Chrome)
Author: gavin19
Created: 2011-12-19 18:50:27+00:00
State: open

Using link, quote, code, bullets, numbers, ಠ\_ಠ or promote results in a loss of focus in Chrome but not Firefox. Opera/Safari untested.

Using a looping `document.activeElement` in the console, it seems Chrome loses focus to the body, while Firefox loses focus entirely (?).

In Chrome this means that shortcuts (F, shift-F etc) become active unless the user explicitly clicks back into the textarea.

I was able to negate this by adding `targetTextArea.focus()` at the end of the `refreshPreview` function, but whether this will have a negative performance impact, I have no idea.