Skip to content

Commit

Permalink
Fix Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
ashubham committed Feb 22, 2018
1 parent f6080c5 commit 081d141
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markee",
"version": "0.3.9",
"version": "0.3.11",
"description": "Visual markers for selected text",
"main": "dist/markee.js",
"typings": "build/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class Markee {
this.initContainer();
this.initDragEvents();
this.initClickEvents();
this.updateSelectedChildren();
}

private initContainer() {
Expand Down Expand Up @@ -52,6 +53,8 @@ export class Markee {
let target: HTMLElement = <HTMLElement>e.target;
if(target.classList.contains(this.config.markerClass)) {
this.dragged = (target.id === this.config.beginClass) ? this.begin : this.end;
// Just to keep Firefox happy.
e.dataTransfer.setData('Text', 'random');
setTimeout(() => target.classList.add(this.config.draggedClass));
}
});
Expand Down

0 comments on commit 081d141

Please sign in to comment.