diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java index 6547c121b..bf18271e7 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java @@ -2117,13 +2117,16 @@ public List getInputs(AiCapability c) { WebViewRegister reg = WebViewRegister.getInstance(); WebView webView1 = reg.get(webViewId); - Object selection = webView1.getEngine().executeScript("(function getSelectionText() {\n" + Object selection = webView1.getEngine().executeScript("(function getSelectionText() {\n" + " var text = \"\";\n" + " if (window.getSelection) {\n" + " text = window.getSelection().toString();\n" + " } else if (document.selection && document.selection.type != \"Control\") {\n" + " text = document.selection.createRange().text;\n" + " }\n" + + " if (text === \"\") {\n" + + " text = document.body.innerText || document.body.textContent;\n" + + " }\n" + " return text;\n" + "})()");