https://bugzilla.wikimedia.org/show_bug.cgi?id=68588
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Summary|VisualEditor: Cursoring at |VisualEditor: Putting |end of page off focusable |cursor after reference list |node following another |throws "offset was inside a |focusable node (?) throws |handlesOwnChildren node" |"offset was inside a |error |handlesOwnChildren node" | |error | --- Comment #1 from Roan Kattouw <[email protected]> --- This doesn't seem to be related to focusable nodes or the end of the document. All you need to do is put the cursor in a block slug after a references list. Suppose the references list is at (23,25). What happens is this: * setSelection (25,25) is called * It tries to compute insertion annotations by pulling from the left * It does so by calling getNearestContentOffset( 24, -1 ) * Two stack levels deeper, getRelativeOffset() notices that 24 is inside of a handlesOwnChildren node and throws an exception Questions: * Why is reference list a handlesOwnChildren node? Is it because <ref> can be nested inside of <references>? * Why do we do offset-1 here? There is a Math.max() to guard against ending up at -1, but this bug uncovers another reason why subtracting one from an offset is dangerous and should ideally never be done -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
