striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit 863807023d63598f1a3661ff2740d57194d50994
parent db412f8faeb3dcc51589a744154fd17757fd0b7d
Author: unitehenry <unitehenry@gmail.com>
Date:   Thu, 24 Oct 2019 08:46:16 -0400

file drop fix

Diffstat:
Mpackage.json | 2+-
Msrc/striveneditor.js | 5++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json @@ -1,7 +1,7 @@ { "name": "@striven-erp/striven-editor", "private": false, - "version": "2.1.0", + "version": "2.1.1", "description": "The lightweight Striven WYSIWYG editor built with pure JavaScript.", "main": "./dist", "scripts": { diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -853,7 +853,9 @@ export default class StrivenEditor { }, false); this.body.ondragenter = e => { - if (e.dataTransfer.files.length && !this.body.querySelector('.se-file-drop-dropzone')) { + console.log(e) + + if (!this.body.querySelector('.se-file-drop-dropzone')) { const dropzone = document.createElement("div"); const dropzoneTextEl = document.createElement("p"); @@ -1219,6 +1221,7 @@ export default class StrivenEditor { this.removePopupEscapeHandler(); this.editor.addEventListener('keyup', this.bound_popupEscapeHandler); } + removePopupEscapeHandler() { this.editor.removeEventListener('keyup', this.bound_popupEscapeHandler); }