This commit is contained in:
parent
74dad4fc55
commit
7f9e795035
1 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,11 @@ export const showTooltip = (message: string, target: Element, error = false) =>
|
|||
messageElement.style.top = top + "px";
|
||||
}
|
||||
if (left + messageElement.clientWidth > window.innerWidth) {
|
||||
messageElement.style.left = (window.innerWidth - messageElement.clientWidth) + "px";
|
||||
if (position === "parentE") {
|
||||
messageElement.style.left = (parentRect.left - 8 - messageElement.clientWidth) + "px";
|
||||
} else {
|
||||
messageElement.style.left = (window.innerWidth - messageElement.clientWidth) + "px";
|
||||
}
|
||||
} else {
|
||||
messageElement.style.left = Math.max(0, left) + "px";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue