fix #1614 Gutter tooltip not showing inside relative container
This commit is contained in:
parent
f1b74a8916
commit
58e1410adf
1 changed files with 4 additions and 3 deletions
|
|
@ -113,11 +113,12 @@ function GutterHandler(mouseHandler) {
|
|||
var rect = editor.renderer.$gutter.getBoundingClientRect();
|
||||
tooltip.style.left = e.x + 15 + "px";
|
||||
if (e.y + 3 * editor.renderer.lineHeight + 15 < rect.bottom) {
|
||||
tooltip.style.bottom = "";
|
||||
tooltip.style.bottom = "";
|
||||
tooltip.style.top = e.y + 15 + "px";
|
||||
} else {
|
||||
tooltip.style.top = "";
|
||||
tooltip.style.bottom = rect.bottom - e.y + 5 + "px";
|
||||
tooltip.style.top = "";
|
||||
var innerHeight = window.innerHeight || document.documentElement.clientHeight;
|
||||
tooltip.style.bottom = innerHeight - e.y + 5 + "px";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue