Closed reckart closed 2 years ago
As a "workaround", I am loading recogito within the iframe now - that works.
Ah - thanks for spotting (and testing). I never even considered the case of using it in an iframe. But your suggested solution to use evt.target.ownerDocument
seems both straightforward & cleaner!
This issue is now fixed, plus a bunch of other issues that didn't work inside an iframe. (I hope I caught everything ;-) Let me know if you experience any other issues!
Cheers, R
RecogitoJS seems to be rendering ok when applying it to the contents of an IFRAME. However, selecting text to create an annotation does not seem to be working. Not that in the specific case, RecogitoJS is initialized outside the iframe but then told to annotate an element within the iframe.
Specifically,
SelectionHandler.js :: _onMouseUp
seems to be obtaining the selection from the wrong document. I.e. it is obtaining the selection from the document outside of the iframe when the selection that has been made was within the iframe:Instead, the selection should probably be obtained from the document which owns the target element of the mouse event, e.g.
evt.target.ownerDocument.getSelection()
.