View Single Post
Old 08-20-2012, 02:54 AM   #19
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,443
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Another bug I noticed is that in the viewer I use a custom handler for users clicking on links. When using equation references, the viewer calls (effectively)

elem = document.getElementById(id)
elem.scrollIntoView()

This does not scroll properly, it seems to scroll so that the bottom of the svg tag containing the element with the given id is at the top of the screen, which means the element is hidden. To workaround it, I am instead scrolling to the parent of the svg tag, which works ok as long as there are not too many equations in that block.

I have no idea why scrollIntoView() misbehaves, would you happen to know why?
kovidgoyal is online now   Reply With Quote