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” }, “*”);
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” }, “*”); Read More