Commit bf6ca1b0 by Arthur Barrett

use document to get scrollTop for firefox

parent 8f1e49ec
...@@ -123,7 +123,7 @@ class @Annotatable ...@@ -123,7 +123,7 @@ class @Annotatable
# tooltip is positioned relative to its container, so we need to factor in offsets # tooltip is positioned relative to its container, so we need to factor in offsets
container_offset = $(container).offset() container_offset = $(container).offset()
offset_left = -container_offset.left offset_left = -container_offset.left
offset_top = $('body').scrollTop() - container_offset.top offset_top = $(document).scrollTop() - container_offset.top
tip_left = offset_left + rect_center - (tip_width / 2) tip_left = offset_left + rect_center - (tip_width / 2)
tip_top = offset_top + rect_top - tip_height + adjust_y tip_top = offset_top + rect_top - tip_height + adjust_y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment