Closed nicolasmaia closed 1 year ago
Thanks for reporting this. I can reproduce it. I'll look into it next week.
Seems to work fine in Firefox with a useragent spoof, but not in Edge.
Looks like it's related to Chromium not digging into shadow DOM for caretRangeFromPoint
(and not supporting caretPositionFromPoint
at all). Test case: https://8t4urf.codesandbox.io/
Seems like Safari has the same problem. Even document.elementsFromPoint
doesn't dig into shadow trees. Instead we'll need to recursively do element(s)FromPoint
on each shadow root until we get to some text. This could be quite a bit of work.
I've made some progress on this. It can now dig into these nested shadow DOM trees fairly successfully but it doesn't successfully mimic the layout of the shadow DOM content in a lot of cases. As a result in Bing chat, you can scan simple sentences, but once the footnote annotations appear they throw off the layout. It should be fixable but it's going to take a bit more work yet.
10ten doesn't work on https://www.bing.com/search?q=Bing+AI
You might need either Edge or a useragent spoofer to be able to use Bing Chat, though