Skip to content

Commit

Permalink
check for content editable as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ppshobi committed Nov 5, 2018
1 parent 5cecb86 commit 52fa28c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {

let text= r.getLorem(length);
let lastFocused = document.activeElement;

debugger;

if(lastFocused != null
&& ($(lastFocused).is('input') || $(lastFocused).is('textarea'))
&& ($(lastFocused).is('input') || $(lastFocused).is('textarea') || $(lastFocused).attr('contenteditable'))
&& ! ($(lastFocused).is('input:radio') || $(lastFocused).is('input:radio'))
) {
let copyFrom = document.createElement("textarea");
Expand Down

0 comments on commit 52fa28c

Please # to comment.