Size input window show up from a canvas in a deeply nested DOM
Size input window show up from a canvas in a deeply nested DOM

If a canvas is placed in a deep node in a DOM tree, it didn't set
size window's coordinates correctly, thus the window seemed not
showing.  The reason is the characteristics of
style.position = "absolute".  Contrary to its name, it won't
place an element in an absolute coordinate space.  Rather, it's
relative to first positioned ancestor.  Positioned ancestor means
one of elements in the parent chain which have the style.position
other than "static".

For details, see
http://www.w3schools.com/css/css_positioning.asp

To fix this problem, we gave up inserting the size window (which
is made of div element) at just before the canvas element in the
DOM tree and make it direct child of document.body.  It could
interfere with other JavaScript codes which may tamper with the
body element, but at least the new method works as DokuWiki plugin.

msakuta/SketchCanvas,msakuta/SketchCanvas,msakuta/SketchCanvas