You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way the client handles anchoring when there are multiple iframes in a document with annotation enabled can result in annotations showing up as Orphans in the sidebar even if they did actually anchor successfully.
When multiple frames are connected to the sidebar, the frameSync service tries to trigger loading/anchoring of all annotations in all frames. Yet it assumes that it will get a single sync response from the host page informing it of whether an annotation anchored or not. So, given the context of eg. a page with two frames on it that have different URLs, what can happen is:
An annotation is loaded for the URL of the first frame
A loadAnnotations message is dispatched to both frames to ask both frames to anchor the annotation, even though it is clearly not going to be found in the second frame
The annotation anchors successfully in the first frame but fails to anchor in the second iframe
A sync message comes back from the first frame with the $orphan flag set to false
A sync message comes back from the second frame with the $orphan flag set to true
The client displays the annotation as an orphan, because that message came back last, even though it did in fact anchor in one of the frames
The ordering in which the "sync" messages come back is not deterministic, which is why it happens only sometimes.
The text was updated successfully, but these errors were encountered:
When multiple frames are connected to the sidebar, the frameSync service tries to trigger loading/anchoring of all annotations in all frames.
This was fixed last year as part of an overhaul of how Hypothesis handles being connected to multiple guest frames. FrameSyncService now only sends each annotation to one guest.
Extracted from #527 (comment)
The way the client handles anchoring when there are multiple iframes in a document with annotation enabled can result in annotations showing up as Orphans in the sidebar even if they did actually anchor successfully.
When multiple frames are connected to the sidebar, the
frameSync
service tries to trigger loading/anchoring of all annotations in all frames. Yet it assumes that it will get a singlesync
response from the host page informing it of whether an annotation anchored or not. So, given the context of eg. a page with two frames on it that have different URLs, what can happen is:loadAnnotations
message is dispatched to both frames to ask both frames to anchor the annotation, even though it is clearly not going to be found in the second framesync
message comes back from the first frame with the$orphan
flag set tofalse
sync
message comes back from the second frame with the$orphan
flag set totrue
The ordering in which the "sync" messages come back is not deterministic, which is why it happens only sometimes.
The text was updated successfully, but these errors were encountered: