Merge pull request #2132 from vikhyat/firefox-paste-image

Support image copy-paste for Firefox 24+
This commit is contained in:
Régis Hanol 2014-03-17 09:29:31 +01:00
commit 2085c82360

View file

@ -326,7 +326,7 @@ Discourse.ComposerView = Discourse.View.extend(Ember.Evented, {
// Ctrl+v to paste so we should be conservative about what browsers this runs
// in.
var uaMatch = navigator.userAgent.match(/Firefox\/(\d+)\.\d/);
if (uaMatch && parseInt(uaMatch[1]) >= 26) {
if (uaMatch && parseInt(uaMatch[1]) >= 24) {
self.$().append( Ember.$("<div id='contenteditable' contenteditable='true' style='height: 0; width: 0; overflow: hidden'></div>") );
self.$().off('keydown.contenteditable');
self.$().on('keydown.contenteditable', function(event) {