FIX: Disable pasting hack for Firefox 50+
This commit is contained in:
parent
8321bdab4e
commit
ac87a86975
|
@ -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.$("<div id='contenteditable' contenteditable='true' style='height: 0; width: 0; overflow: hidden'></div>") );
|
||||
this.$("textarea").off('keydown.contenteditable');
|
||||
this.$("textarea").on('keydown.contenteditable', event => {
|
||||
|
|
Loading…
Reference in New Issue