提交 389540f3 编写于 作者: K Kamran Ahmed

Fix - Popover not in view

上级 76763d78
......@@ -118,14 +118,21 @@ export default class Element {
const highlightedElement = this;
const lastHighlightedElement = this.overlay.getLastHighlightedElement();
const popoverElement = this.popover;
const highlightedNode = this.node;
const lastHighlightedNode = lastHighlightedElement && lastHighlightedElement.node;
// If this element is not already highlighted (because this call could
// be from the resize or scroll) and is not in view
if (highlightedNode !== lastHighlightedNode && !highlightedElement.isInView()) {
highlightedElement.bringInView();
if (highlightedNode !== lastHighlightedNode) {
if (!highlightedElement.isInView()) {
highlightedElement.bringInView();
}
if (!popoverElement.isInView()) {
popoverElement.bringInView();
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册