Developing and testing features or extensions for Microsoft Edge
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm writing an extension for edge, and I need to handle text selection in my typescript application. But the thing is that I can't listen to standard page events like "mouseup", "selectionchange" in reader mode.
That is, this code will write a message to the console on a normal page. But nothing happens on the reader mode page.
document.addEventListener("mouseup", () => {
console.log("Mouse up event");
});
What events and how can I use in my code to handle mouse click or selection change in reader mod?
Developing and testing features or extensions for Microsoft Edge
I can reproduce it in Edge. I guess that's because Reader Mode is designed to provide a simplified reading experience, which may restrict certain interactions. But I also test on Chrome and Firefox reader mode and the page events will be fired.
I think it's by design in Edge and there's no way to handle the events on Edge reader mode for now. I suggest that you can request a new feature to Edge team by pressing Alt+Shift+I in Edge.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yu Zhou