Forum Discussion

mingholylmh's avatar
mingholylmh
Copper Contributor
Aug 09, 2024

Edge Chromium's pdf viewer does not reply correct value to the event 'getSelectedText'

Edge Chromium version 129.0.2752.4

"selectedText" here is expected to be the exact text span selected in pdf page, what we can get for now is an empty string no matter what you select.

 

You can test with:

window.addEventListener(
  "message",
  (event) => console.log(event.data.selectedText),
  true
);

// after select
document.querySelector("embed").postMessage({ type: "getSelectedText" }, "*");
No RepliesBe the first to reply