-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Description
Steps to reproduce
- Activate Hypothesis on this page: http://zork.net/~st/jottings/sais.html
- Select some text
Expected behaviour
Adder should appear near selection.
Actual behaviour
Adder appears far to right of selection.
Additional details
This page has a narrow body which is centered using margin-left: auto; margin-right: auto;, additionally it is positioned using position: relative.
The Adder (<hypothesis-adder>)'s position is calculated based on the required offset from the left edge of the document, but is set using left: Xpx; position: absolute; which usually works because the positioned ancestor (which X is relative to) is the document element itself. In this case however the positioned ancestor is the <body> and so the end offset is <body>.left + X which results in the adder being shifted to the right because the <body> itself is centered in the page.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels