diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6 index c5113a20cf4..f16acd43b9a 100644 --- a/app/assets/javascripts/discourse/components/composer-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6 @@ -296,7 +296,13 @@ export default Ember.Component.extend({ // Believe it or not pasting an image in Firefox doesn't work without this code _firefoxPastingHack() { const uaMatch = navigator.userAgent.match(/Firefox\/(\d+)\.\d/); - if (uaMatch && parseInt(uaMatch[1]) >= 24) { + if (uaMatch) { + let uaVersion = parseInt(uaMatch[1]); + if (uaVersion < 24 || 50 <= uaVersion) { + // The hack is no longer required in FF 50 and later. + // See: https://bugzilla.mozilla.org/show_bug.cgi?id=906420 + return; + } this.$().append( Ember.$("
") ); this.$("textarea").off('keydown.contenteditable'); this.$("textarea").on('keydown.contenteditable', event => {