discourse/discourse — pull request #2094 by vikhyat (2014-03-10 05:48:25+00:00)
Title: Fix Firefox image paste contenteditable hack

Still not 100% sure why the previous version wasn't working, for some reason on the second paste after the clipboard content changes Firefox would switch focus to the contenteditable div but not resume the paste. This doesn't happen if you paste the same text multiple times, only if you paste different text. Weird.

Inserting a contenteditable div once at the start and reusing it instead of inserting a new one on every paste fixes the problem.