From 52fa28ce90c466c52f9561c6e07352aa4a9f1e6c Mon Sep 17 00:00:00 2001 From: Shobi P P Date: Mon, 5 Nov 2018 15:30:03 +0530 Subject: [PATCH] check for content editable as well --- src/js/content.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/content.ts b/src/js/content.ts index 700c76b..eb4bafa 100644 --- a/src/js/content.ts +++ b/src/js/content.ts @@ -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");