Skip to content
Discussion options

You must be logged in to vote

I found a fix for annotations not rendering correctly when placed directly as content (outside code blocks) inside a print layout <table>.

Root cause

The annotation system positions tooltips using two mechanisms that must agree on the same reference element:

  1. JavaScript uses offsetLeft/offsetTop, which are relative to the element's offsetParent. The browser's offsetParent algorithm walks up the DOM and stops at the first element that is either a positioned element (position: relative/absolute/fixed/sticky) or a <td>, <th>, or <table> HTML element — regardless of their CSS display value.

  2. CSS positions .md-tooltip with position: absolute, which is relative to the nearest ancestor with po…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joapuiib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant