-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple unrelated Hypothesis frames on one page causes havoc #249
Comments
Today I was working on an integration that uses the standalone viewer, e.g. https://hypothes.is/a/6aknRpHFEeeBWE9crsbjQA, in a iframe on a page that already has an active instance of H. (Why? Because that view is a useful embeddable widget that can enable display of, and interaction with, a individual annotation and its replies.) As in other scenarios this one triggers "A second Discovery server has been detected" . For this particular use case, since the embedded stream has no concept of, nor need for, a guest/host relationship, it seems possible, and maybe appropriate/useful to return from startDiscovery if |
I started putting together a prototype a while back to explore how to simplify the way the sidebar and content frames discover each other. It can be found at https://github.com/hypothesis/client/tree/new-discovery-prototype/discovery-prototype. |
adding to backlog in favor of #187 |
This was fixed initially by #3599 and then #3611 replaced the whole mechanism that is used by frames to discover each other. There is ongoing work in #3533 which will lift the restriction that host and guest frames must be same-origin. In the client's development server there is a manual test page for this at http://localhost:3000/document/multi-frames. |
Originally reported as hypothesis/h#3433 by me.
Steps to reproduce
Create an HTML document with multiple frames, each containing an instance of Hypothesis. The frames must all be hosted on the same origin.
For example:
index.html
a.html
andb.html
Expected behaviour
Each independent Hypothesis instance can be used on its own without interfering with the others.
Actual behaviour
The "magic" autodiscovery features cause complete havoc. Specifically:
The text was updated successfully, but these errors were encountered: