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
make a selection as below: ( Note: must start selection at blank area !! )
open developer tool console, enter 5 commands:
var sel = document.getElementsByTagName('iframe')[0].contentDocument.getSelection()
var range = document.getElementsByTagName('iframe')[0].contentDocument.createRange()
range.setStart(sel.anchorNode,sel.anchorOffset)
range.setEnd(sel.focusNode,sel.focusOffset)
ReadiumSDK.reader.getRangeCfiFromDomRange(range)
the returned range cfi is "/4[x9-8000]/6/4,,/7:13" (start cfi is empty)
Product
Readium cloud reader app
Additional information
Maybe caused by self-closing tags
The text was updated successfully, but these errors were encountered:
JackieFei
changed the title
When selection include <br/> element, the getRangeCfiFromDomRange() return wrong range cfi
When selection start with <br/> element, the getRangeCfiFromDomRange() return wrong range cfi
Nov 18, 2016
This issue is a Bug
Expected Behaviour
get correct range cfi
Observed behaviour
Readium return the contentCFI:"/4[x9-8000]/6/4,,/7:13” which start cfi is empty
Steps to reproduce
var sel = document.getElementsByTagName('iframe')[0].contentDocument.getSelection()
var range = document.getElementsByTagName('iframe')[0].contentDocument.createRange()
range.setStart(sel.anchorNode,sel.anchorOffset)
range.setEnd(sel.focusNode,sel.focusOffset)
ReadiumSDK.reader.getRangeCfiFromDomRange(range)
Product
Readium cloud reader app
Additional information
Maybe caused by self-closing tags
The text was updated successfully, but these errors were encountered: